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

Fido "Can't convert 'bytes' object to str implicitly" in Python 3.4/3.5 #78

Closed
RvanVeenendaal opened this issue May 30, 2016 · 0 comments

Comments

@RvanVeenendaal
Copy link

Hi,
As a new user of Fido, I ran into the error message from the subject while analysing Fido's README.txt on:

  • Windows 8.1 Enterprise (64 bits)
  • Python 3.4
  • Fido 1.3.4
    The problem seems related to differences between Python 2 and 3 (Unicode handling).
    If I use Python 2.7.11, Fido works just fine ("Plain Text File").
    If I use Python 3.5.1, I get the same error message.
    See below for more details.

c:\fido>fido
usage: fido-script.py [-h] [-v] [-q] [-recurse] [-zip] [-nocontainer]
[-pronom_only] [-input INPUT] [-filename FILENAME]
[-useformats INCLUDEPUIDS] [-nouseformats EXCLUDEPUIDS]
[-matchprintf FORMATSTRING]
[-nomatchprintf FORMATSTRING] [-bufsize BUFSIZE]
[-container_bufsize CONTAINER_BUFSIZE]
[-loadformats XML1,...,XMLn] [-confdir CONFDIR]
[FILE [FILE ...]]
(etc. - Fido seems to have been installed properly)

c:\fido>fido README.txt
FIDO v1.3.4 (formats-v84.xml, container-signature-20160121.xml, format_extension
s.xml)
Traceback (most recent call last):
File "C:\Python34\Scripts\fido-script.py", line 9, in
load_entry_point('opf-fido==1.3.4', 'console_scripts', 'fido')()
File "C:\Python34\lib\site-packages\opf_fido-1.3.4-py3.4.egg\fido\fido.py", line 869, in main
fido.identify_file(file)
File "C:\Python34\lib\site-packages\opf_fido-1.3.4-py3.4.egg\fido\fido.py", line 375, in identify_file
bofbuffer, eofbuffer, _ = self.get_buffers(f, size, seekable=True)
File "C:\Python34\lib\site-packages\opf_fido-1.3.4-py3.4.egg\fido\fido.py", line 543, in get_buffers
bofbuffer = self.blocking_read(stream, bytes_to_read)
File "C:\Python34\lib\site-packages\opf_fido-1.3.4-py3.4.egg\fido\fido.py", line 527, in blocking_read
buffer += readbuffer
TypeError: Can't convert 'bytes' object to str implicitly

c:\fido>

Hwesta added a commit to Hwesta/fido that referenced this issue Oct 3, 2016
@Hwesta Hwesta mentioned this issue Oct 6, 2016
3 tasks
Hwesta added a commit to Hwesta/fido that referenced this issue Oct 13, 2016
Hwesta added a commit to Hwesta/fido that referenced this issue Oct 27, 2016
@Hwesta Hwesta closed this as completed in 89bac18 Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant