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

Exception in SymPy Live while running example from docstring of KanesMethod object #191

Open
Keshavinee opened this issue Apr 10, 2021 · 0 comments

Comments

@Keshavinee
Copy link

I executed the example mentioned in the docstring of the KanesMethod object. It shows me an error in the Sympy Live shell when I tried to display the variable "FL" (Forces/torque list).

from sympy import symbols
from sympy.physics.mechanics import dynamicsymbols, ReferenceFrame
from sympy.physics.mechanics import Point, Particle, KanesMethod
q, u = dynamicsymbols('q u')
qd, ud = dynamicsymbols('q u', 1)
m, c, k = symbols('m c k')
N = ReferenceFrame('N')
P = Point('P')
P.set_vel(N, u * N.x)
kd = [qd - u]
FL = [(P, (-k * q - c * u) * N.x)]
pa = Particle('pa', P, m)
BL = [pa]
FL
Exception in SymPy Live of type
<type 'exceptions.RuntimeError'>
for reference the last 5 stack trace entries are
Traceback (most recent call last):
File "/base/data/home/apps/ssympy-live-hrd/66.426491309333028408/app/handlers.py", line 271, in post
live.evaluate(statement, session, printer, stream)
File "/base/data/home/apps/s
sympy-live-hrd/66.426491309333028408/app/shell.py", line 370, in evaluate
session.set_global('_', val)
File "/base/data/home/apps/ssympy-live-hrd/66.426491309333028408/app/models.py", line 61, in set_global
blob = self.fast_dumps(value, 1)
File "/base/data/home/apps/s
sympy-live-hrd/66.426491309333028408/app/models.py", line 127, in fast_dumps
p.dump(obj)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/6138304582e07bba/python27/python27_dist/lib/python2.7/pickle.py", line 224, in dump
self.save(obj)
RuntimeError: maximum recursion depth exceeded while calling a Python object

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

No branches or pull requests

1 participant