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

AttributeError: 'str' object has no attribute 'decode' #22

Open
jburos opened this issue Oct 17, 2016 · 0 comments
Open

AttributeError: 'str' object has no attribute 'decode' #22

jburos opened this issue Oct 17, 2016 · 0 comments
Labels

Comments

@jburos
Copy link
Member

jburos commented Oct 17, 2016

Seeing the following error with read_files in python3:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-e7b7aaade4df> in <module>()
----> 1 survivalstan.utils.read_files(path='models')

.../.env/lib/python3.5/site-packages/survivalstan/utils.py in read_files(path, pattern, encoding, resource)
    192         file_data['code'] = _read_file(
    193             file,
--> 194             resource=resource).decode(encoding)
    195         results[file_data['basename']] = file_data['code']
    196     return(results)

AttributeError: 'str' object has no attribute 'decode'

Appears to happen when the file being indexed is empty.

@jburos jburos added the bug label Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant