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

Autotranslation fails on windows 10 #7617

Closed
altavir opened this issue Jul 1, 2018 · 1 comment
Closed

Autotranslation fails on windows 10 #7617

altavir opened this issue Jul 1, 2018 · 1 comment

Comments

@altavir
Copy link

altavir commented Jul 1, 2018

beakerx 0.21.0

beakerx.a = 2
2
%%python
from beakerx import beakerx
beakerx.a
---------------------------------------------------------------------------

JSONDecodeError                           Traceback (most recent call last)

<ipython-input-3-9a60c304ad4e> in <module>()
      1 from beakerx import beakerx
----> 2 beakerx.a


~\Anaconda3\lib\site-packages\beakerx\runtime.py in __getattr__(self, name)
    582 
    583     def __getattr__(self, name):
--> 584         return self.get(name)
    585 
    586     def __contains__(self, name):


~\Anaconda3\lib\site-packages\beakerx\runtime.py in get(self, var)
    449 
    450     def get(self, var):
--> 451         result = autotranslation_get(var)
    452         if result == 'undefined':
    453             raise NameError('name \'' + var + '\' is not defined in notebook namespace')


~\Anaconda3\lib\site-packages\beakerx\runtime.py in autotranslation_get(var)
    605 def autotranslation_get(var):
    606     port = os.environ["BEAKERX_AUTOTRANSLATION_PORT"]
--> 607     session_id = get_context_session()
    608     url = 'http://localhost:{0}/autotransltion/{1}/{2}'.format(port, session_id, var)
    609     result = requests.get(url, headers={'Authorization': get_auth_token()})


~\Anaconda3\lib\site-packages\beakerx\runtime.py in get_context_session()
    620     # if subkernel get session from extra start parameters
    621     if len(kernel.parent.argv) == 3:
--> 622         return json.loads(kernel.parent.argv[2])['contextId']
    623     return kernel.session.session


~\Anaconda3\lib\json\__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    352             parse_int is None and parse_float is None and
    353             parse_constant is None and object_pairs_hook is None and not kw):
--> 354         return _default_decoder.decode(s)
    355     if cls is None:
    356         cls = JSONDecoder


~\Anaconda3\lib\json\decoder.py in decode(self, s, _w)
    337 
    338         """
--> 339         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    340         end = _w(s, end).end()
    341         if end != len(s):


~\Anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
    353         """
    354         try:
--> 355             obj, end = self.scan_once(s, idx)
    356         except StopIteration as err:
    357             raise JSONDecodeError("Expecting value", s, err.value) from None


JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
@scottdraves
Copy link
Contributor

thanks for the report, will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants