Comments (11)
Could you please provide the whole stacktrace and the code that resulted in this error? Thanks.
from pymonzo.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-armv61/egg/pymonzo/monzo_api.py", line 97, in __init__
File "build/bdist.linux-armv61/egg/pymonzo/monzo_api.py", line 149, in _get_oauth_token
File "build/bdist.linux-armv61/egg/pymonzo/monzo_api.py", line 123, in _save_token_on_disk
AttributeError: DbfilenameShelf instance has no attribute '__exit__'
from pymonzo.
It could be that I am running an older version of the shelve library?
from pymonzo.
And what was the actual code that resulted in this? Was it just MonzoAPI
object initialization?
To be honest I have no idea why that happens and I can't reproduce it. What distro (OS?) and Python version is this?
It could be that I am running an older version of the shelve library?
shelve
is in Python standard library so I don't think that should be a problem.
from pymonzo.
from pymonzo.
It happens on Python 2.7 on both Windows 10, and Mac OS (whatever the latest version is).
This what I did to fix it for those versions at least -
bartonp@95e2edd?diff=unified - and you don't need the import json. That was there for testing purposes.
from pymonzo.
@bartonp thanks for the confirmation and the fix, I'll try to find some time this weekend to take a look at it.
from pymonzo.
OK, I just replicated this as well on Python 2.7.13 on OS X. Sorry it took so long but it's been a crazy couple of weeks.
I'll fix it in the next couple of days and make sure that the test suite covers this as well.
@MajinLogan so the quick fix for now (until I release a fix) is either to install the version patched by @bartonp or use Python 3
from pymonzo.
I am running this on Rasbian Jessie, and have tried Python 2.7. also tried 3.4 but had a separate error come up for that.
@MajinLogan what error did you get on Python 3.4? Could you open a new issue about it with the stacktrace? I have some free time and would love to squash these bugs
from pymonzo.
This is the error that I get with python 3 (which I have raised as a separate issue:
m.MonzoAPI()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/pymonzo/monzo_api.py", line 95, in __init__
self._token = self._get_oauth_token()
File "/usr/local/lib/python3.6/site-packages/pymonzo/monzo_api.py", line 144, in _get_oauth_token
client_secret=self._client_secret,
File "/usr/local/lib/python3.6/site-packages/requests_oauthlib/oauth2_session.py", line 244, in fetch_token
self._client.parse_request_body_response(r.text, scope=self.scope)
File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 409, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 376, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 383, in validate_token_parameters
raise_from_error(params.get('error'), params)
File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 404, in raise_from_error
raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.ServerError: (server_error) Unknown error occurred
>>>
from pymonzo.
Okay, so this issue should be resolved by the just released v0.9.0
from pymonzo.
Related Issues (20)
- OAuth token refreshing doesn't work HOT 29
- Monzo API HTTP 401 response didn't trigger token refreshing HOT 3
- Question: Help with exporting information to CSV HOT 2
- Initial setup of OAuth as in README is broken HOT 2
- Monzo now requires redirect_uri HOT 5
- Allow custom 'redirect_uri' values HOT 2
- Make MonzoObject serializable to JSON? HOT 1
- Initially created token file is world readable on Unix HOT 3
- Various URLs in the readme still refer to Mondo HOT 2
- MonzoTransaction object.
- Invalid Redirect URI HOT 1
- Unable to access the Monzo API when running as root on raspberry pi 3 HOT 2
- ValueError: Passed data doesn't have all required keys (missing keys: created) HOT 1
- 'dev' branch? HOT 2
- Support for custom categories HOT 1
- Transactions List (with expand_merchants=True) fails pydantic checks HOT 1
- VCR Tests Fail HOT 2
- Get rid of VCR.py
- Can't authenticate - there was a problem sending your magic link HOT 1
- Error during withdrawal: must be greater than 0 (bad_request.bad_param.bad_param.amount) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymonzo.