-
Notifications
You must be signed in to change notification settings - Fork 89
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
--download option throws exception under python3 #52
Comments
Why isn't adding .encode() a fix for 2&3? In Python2 the encode is basically a no-op and it is fixed in python3. |
Sorry. I missed a word or 2 and that is not very clear on what I meant. What I should have said is that I'm not claiming this is a complete fix for all python 2/3 compatibility issues. I've only fixed this specific instance that was throwing the exception. |
I have this exact issue and am struggling with where to implement the encode. |
smithbone replied to my email directly and pointed out my issue. |
If the --download option is used with python3 then a exception occurs.
File "/usr/local/bin/ofxclient", line 9, in
load_entry_point('ofxclient==2.0.3', 'console_scripts', 'ofxclient')()
File "/usr/local/lib/python3.5/dist-packages/ofxclient-2.0.3-py3.5.egg/ofxclient/cli.py", line 56, in run
args.download.write(ofxdata.read())
TypeError: a bytes-like object is required, not 'str'
I fixed it locally by adding a .encode() call into the strings returned by
ofxdata.read().
However, That's not a fix for both python2&3. I see account.py has some 2/3 support but account.download() doesn't use it.
The text was updated successfully, but these errors were encountered: