View Issue Details

IDProjectCategoryView StatusLast Update
0014608ScribusScripterpublic2017-02-07 15:21
ReporterMichael W Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version1.4.6 
Target VersionFixed in Version 
Summary0014608: Autoquote fails
DescriptionTraceback (most recent call last):
  File "<string>", line 8, in <module>
  File "C:\Program Files (x86)\Scribus 1.4.6\share\scripts\Autoquote.py", line 276, in <module>
    elif ((ord(prevchar) == 39) and ((nextchar != ' ') and (nextchar != ',') and (nextchar != ';') and (nextchar != '.'))):
TypeError: ord() expected a character, but string of length 3 found
TagsNo tags attached.
PatchNo

Activities

gpittman

2017-02-07 15:21

developer   ~0043457

I can't reproduce this, either in Linux or Windows 7.
It looks like theoretically there could be a problem at the very beginning, when prevchar is assigned no character (prevchar = ''), but this should fail all the time.
A fix could be to change line 276 to

    elif (prevchar == "'") and ((nextchar != ' ') and (nextchar != ',') and (nextchar != ';') and (nextchar != '.'))):

but this is hard to read. The other possibility might be to assign prevchar to something else initially; something that would generate a number in ord(prevchar).

Issue History

Date Modified Username Field Change
2017-02-06 14:56 Michael W New Issue
2017-02-07 15:21 gpittman Note Added: 0043457