View Issue Details

IDProjectCategoryView StatusLast Update
0004397Slicer4Core: Scripting (Wrapping, Python)public2017-07-27 11:45
ReportermoselhyAssigned Tolassoan 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSlicer 4.7.0 
Target VersionSlicer 4.7.0Fixed in VersionSlicer 4.7.0 
Summary0004397: First command in python console produces error
Description

Hello,

Two issues here:

1) In the first command typed in the python interactor, the user cannot use backspace to correct it (in my example, I made a typo and couldn't correct it)
2) When the user presses the Return key, an error shows and the command is not executed

TagsNo tags attached.

Activities

moselhy

moselhy

2017-07-23 12:53

reporter  

output_WtXvYk[1].gif (37,101 bytes)
output_WtXvYk[1].gif (37,101 bytes)
lassoan

lassoan

2017-07-24 21:27

developer   ~0014938

It seems you have an error in your .slicerrc.py.

Could you please check?

moselhy

moselhy

2017-07-25 10:23

reporter  

Capture.PNG (7,378 bytes)
Capture.PNG (7,378 bytes)
moselhy

moselhy

2017-07-25 10:23

reporter   ~0014968

My slicerrc file contains one line (see attachment), this gives me no errors in the May 15 Release build, but it does in my July 21 & 22 installation.

The problem is that it interprets something else with my console input as you can see in my first screenshot... My console input was:

print("Hello worlf")

but it interprets something before this which is the reason for a syntax error



Capture-2.PNG (7,378 bytes)
Capture-2.PNG (7,378 bytes)
moselhy

moselhy

2017-07-25 10:25

reporter   ~0014969

First screenshot didn't attach properly, here it is:



Capture-3.PNG (53,446 bytes)
Capture-3.PNG (53,446 bytes)
lassoan

lassoan

2017-07-25 11:07

developer   ~0014978

What is the behavior if you don't have a .slicerrc file, if it is empty, or if it contains a print("ok") statement only?
Can you reproduce this with an installed official release?

moselhy

moselhy

2017-07-26 14:30

reporter   ~0014991

In the latest release version it works perfectly fine but not in the latest nightly. See file names for references



release-printok.PNG (7,025 bytes)
release-printok.PNG (7,025 bytes)
release-empty.PNG (6,881 bytes)
release-empty.PNG (6,881 bytes)
nightly-empty.PNG (8,263 bytes)
nightly-empty.PNG (8,263 bytes)
nightly-commented.PNG (8,275 bytes)
nightly-commented.PNG (8,275 bytes)
release-nonexistent.PNG (4,327 bytes)
release-nonexistent.PNG (4,327 bytes)
nightly-nonexistent.PNG (5,421 bytes)
nightly-nonexistent.PNG (5,421 bytes)
nightly-printok.PNG (8,310 bytes)
nightly-printok.PNG (8,310 bytes)
release-commented.PNG (6,817 bytes)
release-commented.PNG (6,817 bytes)
lassoan

lassoan

2017-07-26 22:56

developer   ~0014998

Thank you for the detailed report. Based on that I could reproduce and fix the issue:
https://github.com/commontk/CTK/pull/733

Integrated into rev 26179.

moselhy

moselhy

2017-07-27 11:45

reporter   ~0015001

Thank you, it works now!

Issue History

Date Modified Username Field Change
2017-07-23 12:53 moselhy New Issue
2017-07-23 12:53 moselhy Status new => assigned
2017-07-23 12:53 moselhy Assigned To => jcfr
2017-07-23 12:53 moselhy File Added: output_WtXvYk[1].gif
2017-07-24 21:27 lassoan Note Added: 0014938
2017-07-24 21:27 lassoan Product Version => Slicer 4.7.0
2017-07-24 21:27 lassoan Target Version => Slicer 4.7.0
2017-07-25 10:23 moselhy File Added: Capture.PNG
2017-07-25 10:23 moselhy File Added: Capture-2.PNG
2017-07-25 10:23 moselhy Note Added: 0014968
2017-07-25 10:25 moselhy File Added: Capture-3.PNG
2017-07-25 10:25 moselhy Note Added: 0014969
2017-07-25 11:07 lassoan Note Added: 0014978
2017-07-26 14:30 moselhy File Added: nightly-commented.PNG
2017-07-26 14:30 moselhy File Added: nightly-empty.PNG
2017-07-26 14:30 moselhy File Added: nightly-nonexistent.PNG
2017-07-26 14:30 moselhy File Added: nightly-printok.PNG
2017-07-26 14:30 moselhy File Added: release-commented.PNG
2017-07-26 14:30 moselhy File Added: release-empty.PNG
2017-07-26 14:30 moselhy File Added: release-nonexistent.PNG
2017-07-26 14:30 moselhy File Added: release-printok.PNG
2017-07-26 14:30 moselhy Note Added: 0014991
2017-07-26 22:56 lassoan Assigned To jcfr => lassoan
2017-07-26 22:56 lassoan Status assigned => resolved
2017-07-26 22:56 lassoan Resolution open => fixed
2017-07-26 22:56 lassoan Fixed in Version => Slicer 4.7.0
2017-07-26 22:56 lassoan Note Added: 0014998
2017-07-27 11:45 moselhy Note Added: 0015001