Encoding error

Create issue
Issue #5 new
Former user created an issue

When scanning some files, I get an encoding error:

Traceback (most recent call last): File "av_scan.py", line 33, in <module> scanResult = clamavClient.scan_file(fileName) File "/Library/Python/2.7/site-packages/pyclamd/pyclamd.py", line 320, in scan_file self._send_command('SCAN {0}'.format(file)) UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 17: ordinal not in range(128)

Comments (2)

  1. Roy Shamir

    Some more info: this is on mac OS X Sierra. ClamAV version is 0.97.8. Python 2.7.10. Installed pyclamd via pip.

  2. Roy Shamir

    I have a workaround - rename the file before sending it to the pyclamd API. Looks like the encoding issue is with the file name, not the contents of the file.

  3. Log in to comment