Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on saving results because of null bytes #95

Closed
hsoft opened this issue Jun 22, 2013 · 2 comments
Closed

Crash on saving results because of null bytes #95

hsoft opened this issue Jun 22, 2013 · 2 comments
Labels
bug

Comments

@hsoft
Copy link
Contributor

@hsoft hsoft commented Jun 22, 2013

@@@
Application Identifier: com.hardcoded_software.dupeguru
Application Version: 2.10.0

Traceback (most recent call last):
File "core/app_cocoa_inter.pyc", line 68, in saveResults
File "core/app.pyc", line 327, in save
File "core/results.pyc", line 287, in save_to_xml
File "lxml.etree.pyx", line 634, in lxml.etree._Element.set (src/lxml/lxml.etree.c:33098)
File "apihelpers.pxi", line 488, in lxml.etree._setAttributeValue (src/lxml/lxml.etree.c:14859)
File "apihelpers.pxi", line 1295, in lxml.etree._utf8 (src/lxml/lxml.etree.c:21250)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes
@@@

@hsoft hsoft closed this as completed Jun 22, 2013
@hsoft
Copy link
Contributor Author

@hsoft hsoft commented Jun 22, 2013

Ok, what happens is that lxml raises that error not only on null bytes, but on any character that is invalid xml (\x19 for example). Because it's possible to have filenames that contain these characters, I have to wrap the set in a try.

@hsoft
Copy link
Contributor Author

@hsoft hsoft commented Jun 22, 2013

(from [26609a3e57af]) [#95 state:fixed] Fixed a crash on results save when it contained invalid characters.
http://bitbucket.org/hsoft/dupeguru/changeset/26609a3e57af/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug
Projects
None yet
Development

No branches or pull requests

1 participant