View Issue Details

IDProjectCategoryView StatusLast Update
0004471Slicer4Core: Scripting (Wrapping, Python)public2018-05-29 15:14
ReportermoselhyAssigned Tolassoan 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in VersionSlicer 4.9.0 
Summary0004471: Slicer does not parse the python script path correctly
Description

Hello,

If I run Slicer.exe with the --python-script argument, and provide a path which has folder names starting with certain letters (such as 'b'), it does not parse it correctly. This is because the string is not parsed as a 'raw' string, just like you would parse it in python with the 'r' prefix... i.e. s = r'C:\Users\Moselhy\Desktop\bash\myscript.py'
which is different from s = 'C:\Users\Moselhy\Desktop\bash\myscript.py'

Steps To Reproduce
  1. Make a file with the contents:
    print("Hello world")

  2. Save the file as C:\bla\helloworld.py

  3. Open cmd.exe

  4. cd to your Slicer.exe directory

  5. Run Slicer.exe --python-script "C:\bla\helloworld.py"

  6. Watch for the error in the bottom-right of your Slicer window
TagsNo tags attached.

Activities

moselhy

moselhy

2017-10-30 19:55

reporter  

s.PNG (11,966 bytes)
s.PNG (11,966 bytes)
lassoan

lassoan

2018-05-29 15:14

developer   ~0015770

Fixed in r27217

Issue History

Date Modified Username Field Change
2017-10-30 19:55 moselhy New Issue
2017-10-30 19:55 moselhy Status new => assigned
2017-10-30 19:55 moselhy Assigned To => jcfr
2017-10-30 19:55 moselhy File Added: s.PNG
2018-05-29 15:14 lassoan Assigned To jcfr => lassoan
2018-05-29 15:14 lassoan Status assigned => resolved
2018-05-29 15:14 lassoan Resolution open => fixed
2018-05-29 15:14 lassoan Fixed in Version => Slicer 4.9.0
2018-05-29 15:14 lassoan Note Added: 0015770