Could not get context for py


#1

Instructions on the website says to execute

$ pip install https://github.com/stencila/py/archive/master.zip
$ python -m stencila register

I ran

$ python -m pip install https://github.com/stencila/py/archive/master.zip
Successfully built stencila
$ python -m stencila register

but stencila-desktop-0.28.2-x86_64.AppImage still give me

Could not get context for py

Did I miss something?

$ uname -a
Linux ssi 4.14.47-1-MANJARO #1 SMP PREEMPT Thu May 31 06:19:52 UTC 2018 x86_64 GNU/Linux
$ which python
/home/raniere/anaconda3/bin/python
$ python
Python 3.5.4 |Anaconda, Inc.| (default, Nov  3 2017, 20:01:27) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import stencila

#2

@rgaiacs: if python -m stencila register was successful then you should have a file called py.json in ~/.stencila/hosts. This is the file that Stencila Desktop looks for and uses to launch a new PythonContext and will say “Could not get context for py” if it’s not there.

Could you try find on py.json in your home directory.

If you open up the “Hosts” panel you will see what execution contexts have been successfully registered on your machine:


#3

you should have a file called py.json in ~/.stencila/hosts.

The file was at /root/.stencila/hosts because I run the command as root but call Stencila as my user. It works now. Thanks.


#4

@rgaiacs : glad you found the problem. Would :heart: a pull request :wink: on where you think documentation could be improved so that others down’t have the same problem.