SymPy Live not working properly

82 views
Skip to first unread message

Gagandeep Singh (B17CS021)

unread,
Jan 13, 2020, 8:26:27 AM1/13/20
to sympy
Hi,

I am facing some problems on SymPy Live. I tried executing the example session on live.sympy.org and the following error was thrown,

```
>>> expr = (x + y)**5
Traceback (most recent call last): File "<string>", line 1, in <module> File "/base/data/home/apps/s~sympy-live-hrd/20200105t193609.423659059328302322/sympy/sympy/core/decorators.py", line 91, in __sympifyit_wrapper return func(a, b) File "/base/data/home/apps/s~sympy-live-hrd/20200105t193609.423659059328302322/sympy/sympy/core/decorators.py", line 129, in binary_op_wrapper return func(self, other) File "/base/data/home/apps/s~sympy-live-hrd/20200105t193609.423659059328302322/sympy/sympy/core/expr.py", line 176, in __add__ return Add(self, other) File "/base/data/home/apps/s~sympy-live-hrd/20200105t193609.423659059328302322/sympy/sympy/core/cache.py", line 94, in wrapper retval = cfunc(*args, **kwargs) File "/base/data/home/apps/s~sympy-live-hrd/20200105t193609.423659059328302322/sympy/sympy/core/compatibility.py", line 916, in wrapper del cache[oldkey] KeyError: [<class 'sympy.core.add.Add'>, x, y, <class 'sympy.core.assumptions.ManagedProperties'>, <class 'sympy.core.symbol.Symbol'>, <class 'sympy.core.symbol.Symbol'>]
```
Can someone help me with this? 
Thank you.

Aaron Meurer

unread,
Jan 13, 2020, 3:17:15 PM1/13/20
to sympy
It probably matters what you executed before this. SymPy Live does
some hacks to fake a continuous Python session. I tried executing
"expr = (x + y)**5" in SymPy Live and got no errors.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/d8cfc1f2-976f-4829-b02c-15423e9e07eb%40googlegroups.com.

Chris Smith

unread,
Jan 14, 2020, 10:45:40 AM1/14/20
to sympy
I have found that if you use "_" to refer to the last output it causes this problem. Fix: reload and remember not to do that.

Aaron Meurer

unread,
Jan 14, 2020, 12:16:21 PM1/14/20
to sympy
Open an issue in the Live repo about this.

SymPy Live will need some serious refactoring in the near future
anyway in order to keep it up-to-date, since the current setup doesn't
support Python 3. I'm still hopefully that we can replace the backend
completely (this would be a good GSoC project for anyone interested).

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/6c3e4698-8945-4054-8c12-f452b489ee23%40googlegroups.com.

Kaustubh Dixit

unread,
Jan 14, 2020, 1:32:20 PM1/14/20
to sympy
Interested in working on this project for GSoC. What are you planning to implement on the backend side?
> To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.

James .

unread,
Jan 14, 2020, 1:32:34 PM1/14/20
to sy...@googlegroups.com
Hi,My name is James, i am a 3rd year undergraduate student from India. I am using python from 3 years, from a couple of months ago I started using sympy and I am very much interested in refactoring sympy live.can someone help me what are the prerequisites I need to do this?

Gagandeep Singh (B17CS021)

unread,
Jan 14, 2020, 1:40:57 PM1/14/20
to sy...@googlegroups.com

Aaron Meurer

unread,
Jan 14, 2020, 1:42:25 PM1/14/20
to sympy
Well none of us are backend developers, or else we probably would have
done something like this already. So you would need to have some
decent backend experience, and would need to come up with a plan on
what to actually do.

I would prefer to build as little as possible for ourselves, so that
we don't have to maintain much. So I would look into other projects
such as Binder, and look at what other projects are building in this
area. If we can build something that is usable by others, or better,
reuse something that is already built, that would be ideal.

The biggest technical issue with the App Engine is that it isn't
really designed to do what are do with it. Each App Engine execution
can run for at most 60 seconds. We "fake" a continual session with
this by doing some tricks like pickling the session. This leads to all
kinds of bugs, such as the one listed here. I don't actually know what
causes the bug listed here, but I can make a pretty strong guess that
it has to do with this. Actually most of these issues have to do with
pickling itself being broken in a lot of SymPy, but even so, it would
be better if we had a real persistent session, similar to how
something like Binder works

At a higher level, I don't like that we have a lot of cloud specific
code that we have to maintain ourselves, because really nobody does
maintain it, as you can see from the commit history of the SymPy Live
repo.

The advantage of the App Engine is that it does autoscaling and
automatic sandboxing.

Aaron Meurer
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHvhkMQdDDX%3Doi-%3D_dfp4%3DT1pKdxjy1%2BHdN3ikfhBxGY4U-Akw%40mail.gmail.com.

Gagandeep Singh (B17CS021)

unread,
Jan 15, 2020, 12:06:15 PM1/15/20
to sy...@googlegroups.com
IMHO, it would be great to have the sessions of a particular user saved. I observed that there is a `Log In` link that let's someone create a session but it isn't worked upon further. Probably, using django for redesigning sympy-live would be great as it will be easy to maintain. We can start from unoptimized version of the website. Though I am not aware whether Google App Engine supports django. 
Let me know what you think. 



--
With regards,
Gagandeep Singh

Kaustubh Dixit

unread,
Jan 15, 2020, 12:14:09 PM1/15/20
to sympy
If SymPy Live is to be remade with Django like what Gagandeep stated, I would love to contribute to the project as I have some production level experience in that.

James .

unread,
Jan 15, 2020, 12:24:38 PM1/15/20
to sy...@googlegroups.com
Django is the best option for sympy live, i have already planned on telling this because Django is more faster than the current framework and most of the big companies are also  using Django only.

Mridul Seth

unread,
Jan 16, 2020, 2:23:30 PM1/16/20
to sympy
As Aaron suggested, wouldn't it be much better to use something like mybinder in the background or https://ines.github.io/juniper/ ?
Why reinvent the wheel?

The autoscaling thing of App engine translates easily to mybinder too as every user will have their own instance(docker container) of mybinder running in the background,
unless sympy expects more than 100 concurrent users it should be okay.

On Wednesday, 15 January 2020 22:54:38 UTC+5:30, James . wrote:
Django is the best option for sympy live, i have already planned on telling this because Django is more faster than the current framework and most of the big companies are also  using Django only.

>> > To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.

>> > To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/6c3e4698-8945-4054-8c12-f452b489ee23%40googlegroups.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "sympy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.

>> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BirBEH3Ki-ka9MoG91y%3DcmGRbYqrgYYaxweAkLUsmWJg%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.

> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHvhkMQdDDX%3Doi-%3D_dfp4%3DT1pKdxjy1%2BHdN3ikfhBxGY4U-Akw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.


--
With regards,
Gagandeep Singh

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.

Aaron Meurer

unread,
Jan 16, 2020, 2:44:28 PM1/16/20
to sympy
I'm not really sure how to create a graph of the number of concurrent
users on the App Engine Dashboard. If anyone knows how to do it, let
me know.

Aaron Meurer
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/09365dca-af50-4c68-b0b1-e8cc4c02b6aa%40googlegroups.com.

James .

unread,
Jan 17, 2020, 8:41:49 AM1/17/20
to sy...@googlegroups.com
https://github.com/sympy/sympy-live/blob/master/README.rst
from this i have followed every step,but im not able to see the gui of sympy live shell in my local server,i think its because of this command "$ git submodule update"-->its not working,its showing some error.
""""
git submodule update
Cloning into 'C:/Users/James/AppData/Local/Google/Cloud SDK/sympy-live/static'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'g...@github.com:sympy/sympy-web-static.git' into submodule path 'C:/Users/James/AppData/Local/Google/Cloud SDK/sympy-live/static' failed
Failed to clone 'static'. Retry scheduled
Cloning into 'C:/Users/James/AppData/Local/Google/Cloud SDK/sympy-live/static'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'g...@github.com:sympy/sympy-web-static.git' into submodule path 'C:/Users/James/AppData/Local/Google/Cloud SDK/sympy-live/static' failed
Failed to clone 'static' a second time, aborting

"""

if anyone testing sympy live shell on their local server please tell me how you did it..

Regards,
James


Aaron Meurer

unread,
Jan 17, 2020, 12:08:34 PM1/17/20
to sympy
I think you will need to add your ssh key to GitHub. We should be
using the https URL here
https://github.com/sympy/sympy-live/blob/master/.gitmodules.

Aaron Meurer
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHvhkMQAXapmptOJvpuvXzJCwcCj2_s0caNcRosZSBEk-fOrpQ%40mail.gmail.com.

James .

unread,
Jan 17, 2020, 12:38:23 PM1/17/20
to sy...@googlegroups.com
just now added ssh key,still same error coming..


James .

unread,
Jan 17, 2020, 1:37:12 PM1/17/20
to sy...@googlegroups.com
where is this "

dev_appserver.py
"
i cant find it anywhere

James .

unread,
Jan 17, 2020, 2:51:36 PM1/17/20
to sy...@googlegroups.com
working now above things, but at this link  https://github.com/sympy/sympy-live   this command " ../google_appengine/dev_appserver.py"  giving error 

James .

unread,
Jan 19, 2020, 7:59:39 AM1/19/20
to sy...@googlegroups.com
Hi everyone,
If anyone using sympy live shell on their local machine and on gae pls help me I have followed each and everystep on docs but I still couldn't figure out the problem .
If anyone using shell succesfully pls send me their app.yaml file
I have been trying on Google to solve this problem from 2 days but still couldn't solve .
IMG-20200119-WA0013.jpg
IMG-20200119-WA0012.jpg

Oscar Benjamin

unread,
Jan 19, 2020, 8:08:42 AM1/19/20
to sympy
If you install google cloud SDK and clone the sympy live repo you can
run it locally with:

../../google-cloud-sdk/bin/dev_appserver.py .

(i.e. run this command in the root of the sympy-live repo and give the
path to the dev_appserver.py script)

Then go to a browser and open localhost:8080

That should work with the app.yml as it is in sympy-live master.
However that app.yaml will not work on google cloud. I have a PR that
reverses that situation:
https://github.com/sympy/sympy-live/pull/139
After merging that PR sympy live will not work locally but will work
when pushed to google.
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHvhkMR-_aKx%3Dh-bHb8L8wRu1z-mkZbqVG0bYVvA4opwO8Wn6Q%40mail.gmail.com.

James .

unread,
Jan 19, 2020, 1:20:52 PM1/19/20
to sy...@googlegroups.com
what is the meaning of this 
"
  # if you're adding the shell to your own app, change this regex url to the URL
# endpoint where you want the shell to run, e.g. /shell . You'll also probably
# want to add login: admin to restrict to admins only.
- url: /.*
  script: shell.application
  secure: always
"

James .

unread,
Jan 20, 2020, 12:29:55 AM1/20/20
to sy...@googlegroups.com
if you dont mind can u pls tell me in specific
while running this command(../../google-cloud-sdk/bin/dev_appserver.py .)  its showing like this "'..' is not recognized as an internal or external command,
operable program or batch file."" 
my cloud sdk in this path "C:\Users\James\AppData\Local\Google\Cloud SDK"
sympy live  repo at "C:\Users\James\AppData\Local\Google\Cloud SDK\sympy-live"
can u tell me at what path do i have to use this command  ../../google-cloud-sdk/bin/dev_appserver.py .
im using windows 10.

Oscar Benjamin

unread,
Jan 20, 2020, 9:27:08 AM1/20/20
to sympy
I'm afraid I can't tell you exactly what to do here. It depends where
the files are on your computer. When I installed google-cloud-sdk I
installed it to a local directory and I can run the files from there.
I don't know where you have installed the files I'm afraid. It's also
possible that the correct commands on Windows are different (I don't
use Windows).

Probably there is a tutorial somewhere that explains how to use
google-cloud-sdk more generally. It might be worth going through
something like that before trying to get sympy-live to work.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHvhkMQt4KLm2_atjMcGVBGuC-DqD_fF_ZAtBVRq7F8BFFo__A%40mail.gmail.com.

James .

unread,
Jan 20, 2020, 10:59:05 AM1/20/20
to sy...@googlegroups.com
Okay, can you pls send me your app.yaml file, I will take it as a reference to work mine and I will reinstall everything and try to work it this time..

Oscar Benjamin

unread,
Jan 20, 2020, 1:09:21 PM1/20/20
to sympy
For me sympy live runs locally using the app.yaml from the repo
(current master). The version that is installed in google cloud is
different. I sent the changes as a PR:
https://github.com/sympy/sympy-live/pull/139
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHvhkMRFQxTxzkWBL2uUQYU_LtXxkMwkU8jui%2B66z2%3D8o2vV0Q%40mail.gmail.com.

James .

unread,
Jan 22, 2020, 11:01:02 AM1/22/20
to sy...@googlegroups.com
I changed my os to Linux but still it's not working for me I have tried to run sympy live in my local server but it's coming like this

IMG20200122212933.jpg
Reply all
Reply to author
Forward
0 new messages