opened
cr0n-dist0rti0n
username_0
*** Error Output Below ***

```
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 353, in raw_decode
  obj, end = self.scan_once(s, idx)

builtins.StopIteration: 1

During handling of the above exception, another exception occurred:

￼ File "/dowload_questrade_data/questrade/questrade_play.py", line 4, in <module>
  q = Questrade(refresh_token='<my token code>')
File "/usr/local/lib/python3.7/site-packages/questrade_api/questrade.py", line 22, in __init__
  self.auth = Auth(**auth_kwargs, config=self.config)
File "/usr/local/lib/python3.7/site-packages/questrade_api/auth.py", line 20, in __init__
  self.__refresh_token(kwargs['refresh_token'])
File "/usr/local/lib/python3.7/site-packages/questrade_api/auth.py", line 39, in __refresh_token
  token = json.loads(r.read().decode('utf-8'))
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads
  return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
  obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode
  raise JSONDecodeError("Expecting value", s, err.value) from None

json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
```

*** From 'decoder.py' ***

 ```
   def raw_decode(self, s, idx=0):
        """Decode a JSON document from ``s`` (a ``str`` beginning with
        a JSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.

        This can be used to decode a JSON document from a string that may
        have extraneous data at the end.

        """
        try:
            obj, end = self.scan_once(s, idx)
        except StopIteration as err:
            raise JSONDecodeError("Expecting value", s, err.value) from None
        return obj, end

```
Issue with line 355: `raise JSONDecodeError("Expecting value", s, err.value) from None`
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
issue
created
jborchma
username_1
Hey! Thanks for flagging this issue. Could you provide a minimal example for this error?
comment
created
jborchma
username_1
Also, it looks like you're using a different package?
comment
created
cr0n-dist0rti0n
username_0
Hey,

This is interestingly enough was also happening with questrade_api as well.
I was attempting to use both of them. I also ran this on a different system
with a fresh install of python and got the same error message. Here is an
example of my program:

***********
from qtrade import Questrade

qtrade = Questrade(access_code='pRzav*****X0')
qtrade.get_access_token()

***********
Currently I'm now getting a different error:

***********

￼ File "/dowload_questrade_data/questrade/questrade_play.py", line 3, in
<module>
  qtrade = Questrade(access_code='pRza*****0')
File "/usr/local/lib/python3.7/site-packages/qtrade/questrade.py", line 38,
in __init__
  self.get_access_token()
File "/usr/local/lib/python3.7/site-packages/qtrade/questrade.py", line 83,
in get_access_token
  data.raise_for_status()
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 941,
in raise_for_status
  raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url:
https://login.questrade.com/oauth2/token?grant_type=refresh_token&refresh_token=pRza*****X0

***********

So essentially trade is just not initialising at all. Thanks for your help
on this. I am very interested in working with your program.

cr0n
comment
created
jborchma
username_1
So, I can't reproduce your error. For me, it works fine.
comment
created
jborchma
username_1
Any update from your side? Everything is still working fine for me.
comment
created
jborchma
username_1
Ok, I am going to close this for now. Please update if you have something else coming up.
comment
closed
jborchma
username_1
issue