robotics-toolbox-python icon indicating copy to clipboard operation
robotics-toolbox-python copied to clipboard

module 'sympy.core.core' has no attribute 'symbol'

Open LorenzoRamirez opened this issue 3 years ago • 4 comments
trafficstars

Check here first

Common issues

Describe the bug A clear and concise description of what the bug is. I down load and install roboticstoolbox-python (1.0.1)

Version information roboticstoolbox-python (1.0.1) Did you install from PyPI or GitHub? If PyPI what version number? If GitHub what commit hash? I install using pip

Robotics Toolbox depends heavily on two other packages: Swift (3D graphics) and SpatialMath toolbox (underpinning maths utilities). If you think your issue is related to these, then please answer the questions above for them.

To Reproduce Steps to reproduce the behavior:

  1. The shortest, complete, Python script that exhibits the bug.
  2. The script output, including error messages. I try in Jupyter Notebook the following comnad:

import roboticstoolbox as rtb

and I got the follwoing error:



AttributeError Traceback (most recent call last) /var/folders/mm/6h83jcs57_qb997r_m_wyzkc0000gq/T/ipykernel_69066/875870540.py in ----> 1 import roboticstoolbox as rtb

/Users/Shared/my_project_folder/anaconda3/envs/py3k/anaconda3_9-1-2021/anaconda3/lib/python3.8/site-packages/roboticstoolbox/init.py in 1 from roboticstoolbox.tools import * 2 ----> 3 from roboticstoolbox.robot import * 4 5 from roboticstoolbox.mobile import *

/Users/Shared/my_project_folder/anaconda3/envs/py3k/anaconda3_9-1-2021/anaconda3/lib/python3.8/site-packages/roboticstoolbox/robot/init.py in ----> 1 from roboticstoolbox.robot.Robot import Robot 2 from roboticstoolbox.robot.Link import Link, Link2 3 from roboticstoolbox.robot.DHRobot import SerialLink, DHRobot 4 from roboticstoolbox.robot.DHLink import ( 5 DHLink,

/Users/Shared/my_project_folder/anaconda3/envs/py3k/anaconda3_9-1-2021/anaconda3/lib/python3.8/site-packages/roboticstoolbox/robot/Robot.py in 17 from roboticstoolbox.backends.PyPlot.EllipsePlot import EllipsePlot 18 from roboticstoolbox.robot.Dynamics import DynamicsMixin ---> 19 from roboticstoolbox.robot.ETS import ETS 20 from roboticstoolbox.robot.IK import IKMixin 21 from typing import Optional, Union, overload, Dict, Tuple

/Users/Shared/my_project_folder/anaconda3/envs/py3k/anaconda3_9-1-2021/anaconda3/lib/python3.8/site-packages/roboticstoolbox/robot/ETS.py in 40 from copy import deepcopy 41 from roboticstoolbox import rtb_get_param ---> 42 from roboticstoolbox.robot.ET import ET, ET2 43 from spatialmath.base import getvector 44 from spatialmath import SE3

/Users/Shared/my_project_folder/anaconda3/envs/py3k/anaconda3_9-1-2021/anaconda3/lib/python3.8/site-packages/roboticstoolbox/robot/ET.py in 30 31 # Sym = sympy.Expr ---> 32 Sym = sympy.core.symbol.Symbol 33 34 except ImportError: # pragma: no cover

AttributeError: module 'sympy.core.core' has no attribute 'symbol'


Expected behavior A clear and concise description of what you expected to happen. I was expecting no error when executing the command:

import roboticstoolbox as rtb

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Your OS (MacOS, Linux, Windows).
  • Your Python version.

I am on MAC High Sierra (10.13.6) Python ipython 8.3.0 sympy 1.5.1 Additional context Add any other context about the problem here. This is the first time I tried to use roboticstoolsbox-python in Jupyter Notebook. It seems that the issue could be with Sympy but I do not know what to do in order to solve the issue.
I search for a similar issue but I did not find any reported issue. Any help will be greatly appreciated. Thanks

LorenzoRamirez avatar Jul 04 '22 05:07 LorenzoRamirez

Hey @LorenzoRamirez, could you please share the output of

pip list | grep sympy

jhavl avatar Jul 04 '22 06:07 jhavl

Jesse Here it is the requested output: -----------------

(base) Macintosh-6:~ JCarrington$ pip list | grep sympy

sympy  1.5.1

WARNING: You are using pip version 20.3.4; however, version 22.1.2 is

available.

You should consider upgrading via the

'/Users/Shared/my_project_folder/anaconda3/envs/py3k/anaconda3_9-1-2021/anaconda3/bin/python -m pip install --upgrade pip' command.------------------- Please let me know if additional information is required and thanks for the help! Lorenzo Ramirez

-----------------------------------------From: "Jesse Haviland" 

To: "petercorke/robotics-toolbox-python" Cc: "Lorenzo", "Mention" Sent: Monday July 4 2022 2:20:27AM Subject: Re: [petercorke/robotics-toolbox-python] module 'sympy.core.core' has no attribute 'symbol' (Issue #323)

Hey @LorenzoRamirez [1], could you please share the output of 

Links:

[1] https://github.com/LorenzoRamirez [2] https://github.com/petercorke/robotics-toolbox-python/issues/323#issuecomment-1173398405 [3] https://github.com/notifications/unsubscribe-auth/AEJCE3WHGGNONJVBVTAAMGTVSJ7CVANCNFSM52R4TFCA

LorenzoRamirez avatar Jul 05 '22 20:07 LorenzoRamirez

upgrade sympy to 1.10.1 solve the problem

JefferyChiang avatar Jul 07 '22 03:07 JefferyChiang

JefferyThanks for the email. As recommended I upgrade sympy and the error went away. FYI . I am dealing with another error that I will report in the sissue:ImportError: cannot import name 'UGraph' from 'pgraph' I tried few things but I can ot resolve the issue. Take care Lorenzo Ramirez

-----------------------------------------From: "JefferyChiang" 

To: "petercorke/robotics-toolbox-python" Cc: "Lorenzo", "Mention" Sent: Wednesday July 6 2022 11:30:40PM Subject: Re: [petercorke/robotics-toolbox-python] module 'sympy.core.core' has no attribute 'symbol' (Issue #323)

upgrade sympy to 1.10.1 solve the problem 

—

Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you were mentioned.Message ID:

Links:

[1] https://github.com/petercorke/robotics-toolbox-python/issues/323#issuecomment-1177012179 [2] https://github.com/notifications/unsubscribe-auth/AEJCE3TQUYGKX7D6Y6JPNATVSZFN7ANCNFSM52R4TFCA

LorenzoRamirez avatar Jul 16 '22 23:07 LorenzoRamirez

closing the sympy issue now. works now with no simpy installed or latest version 1.11 installed.

petercorke avatar Apr 21 '23 02:04 petercorke