Code Monkey home page Code Monkey logo

Comments (11)

pawelad avatar pawelad commented on September 24, 2024

Could you please provide the whole stacktrace and the code that resulted in this error? Thanks.

from pymonzo.

MajinLogan avatar MajinLogan commented on September 24, 2024
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.

MajinLogan avatar MajinLogan commented on September 24, 2024

It could be that I am running an older version of the shelve library?

from pymonzo.

pawelad avatar pawelad commented on September 24, 2024

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.

MajinLogan avatar MajinLogan commented on September 24, 2024

from pymonzo.

bartonp avatar bartonp commented on September 24, 2024

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.

pawelad avatar pawelad commented on September 24, 2024

@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.

pawelad avatar pawelad commented on September 24, 2024

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.

pawelad avatar pawelad commented on September 24, 2024

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.

delabere avatar delabere commented on September 24, 2024

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.

pawelad avatar pawelad commented on September 24, 2024

Okay, so this issue should be resolved by the just released v0.9.0

from pymonzo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.