View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0014608||Scribus||Scripter||public||2017-02-06 14:56||2017-02-07 15:21|
|Reporter||Michael W||Assigned To|
|Target Version||Fixed in Version|
|Summary||0014608: Autoquote fails|
|Description||Traceback (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
|Tags||No tags attached.|
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).