(10-06-2022, 11:49 AM)Sam Wrote:Can you try the following?
C:\RoboDK\Python\python.exe -m pip install --upgrade --force-reinstall mecademicpy
We used to bundle the mecademicpy driver with RoboDK, but removed in recently. It should automatically install.
What RoboDK version are you using?
I saw in v5.5,
New in RoboDK v5.5.0 (2022-08-19)
- Added support for importing STEP and IGES files on MacOS
- Fixed joint limits issue with the collision free planner
- Fixedmecademicpy installer
- 改进的三菱司机
- Added Surface Pattern Generation App
- Updated Mac version
- Added option to filter KUKA CIRC movements
Unfortunately this just got me back to the first issue, seemingly related to lack of a dependency or inability to traverse the path correctly,
Code:
Starting robot driver: C:/RoboDK/api/robot/apimecademicpy.py
Starting...
意想不到的错误:回溯(最近调用):
Unexpected error: File "C:/RoboDK/api/robot/apimecademicpy.py", line 26, in
Unexpected error: exec("from v" + version_str + ".apimecademicpy import *")
Unexpected error: File "", line 1, in
Unexpected error: File "C:\RoboDK\api\robot\apimecademicpy.py", line 62, in
Unexpected error: File "C:\RoboDK\Python\mecademicpy\robot.py", line 6, in
Unexpected error: import deprecation
Unexpected error: ModuleNotFoundError: No module named 'deprecation'
Sending command...
Stopped
Driver apimecademicpy.py not running
But your fix (basically) worked! I did not have a `python.exe`in C:\RoboDK\Python\, so I called the --force reinstall using the included python 3.7 environment:
Code:
user@h0stname MINGW64 /c/RoboDK/Python37
$ ./python.exe -m pip install --upgrade --force-reinstall mecademicpy
Collecting mecademicpy
Downloading https://files.pythonhosted.org/packages/79/62/c8bfc25593befb28d9747f575b0ed7c49b76457742804764752229072c9c/mecademicpy-1.2.1-py3-none-any.whl (65kB)
Collecting deprecation (from mecademicpy)
Downloading https://files.pythonhosted.org/packages/02/c3/253a89ee03fc9b9682f1541728eb66db7db22148cd94f89ab22528cd1e1b/deprecation-2.1.0-py2.py3-none-any.whl
Collecting dataclasses-json>=0.5.4 (from mecademicpy)
Downloading https://files.pythonhosted.org/packages/58/7e/2042610dfc8121e8119ad8b94db496d8697e4b0ef7a6e378018a2bd84435/dataclasses_json-0.5.7-py3-none-any.whl
Collecting requests (from mecademicpy)
Downloading https://files.pythonhosted.org/packages/ca/91/6d9b8ccacd0412c08820f72cebaa4f0c0441b5cda699c90f618b6f8a1b42/requests-2.28.1-py3-none-any.whl (62kB)
Collecting pandas (from mecademicpy)
Downloading https://files.pythonhosted.org/packages/b2/56/f886ed6f1777ffa9d54c6e80231b69db8a1f52dcc33f5967b06a105dcfe0/pandas-1.3.5-cp37-cp37m-win_amd64.whl (10.0MB)
Collecting packaging (from deprecation->mecademicpy)
Using cached https://files.pythonhosted.org/packages/05/8e/8de486cbd03baba4deef4142bd643a3e7bbe954a784dc1bb17142572d127/packaging-21.3-py3-none-any.whl
Collecting typing-inspect>=0.4.0 (from dataclasses-json>=0.5.4->mecademicpy)
Downloading https://files.pythonhosted.org/packages/be/01/59b743dca816c4b6ca891b9e0f84d20513cd61bdbbaa8615de8f5aab68c1/typing_inspect-0.8.0-py3-none-any.whl
Note `packaging` is the only one in this list where it already had the identical package downloaded and could use the cached version. While maybe some got updated, this leads me to think there is still something wonky with the mecademicpy installer. This Python 3.7 environment is confirmed to be my system Python, figuring I should let it have this just in case, and I can do my other stuff on the side in conda with explicit virtual environments in their own area.
So it is now connecting, and usually can move. Though...
I'm not sure if related, but I do sometimes get these in the logs:
Code:
Connecting to robot 192.168.0.100
Working...
Robot status: Active: False, Homed: False, Simmode: False, Error: False, Pause: False, EOB: True
Robot infos: Model: Meca500, Revision: 3, Version: 8.4.5.2580, SN: M500-[redacted], IP: 192.168.0.100
Reset errors...
Unexpected error: Received robot error 1005 (MX_ST_NOT_ACTIVATED): The robot is not activated.
Connection problems
Connection refused. You may need to reboot your Meca robot.
Disconnected
Ready
'NoneType' object has no attribute 'wait'
Disconnected
It seems like something drops or is unhandled, and a list becomes undefined or 'None', but it doesn't say what. The web interface can then be used to re-connect, clear errors, home, and then I can connect again in RoboDK (after closing the connection there). There is no need to re-boot it, though I do need to re-home in the web interface to use it and get it back into a state RoboDK is happy with. Is there a way to turn up log verbosity, or trace this myself? Is this related to a module not being installed by the mecademicpy installer? Or any other ideas?
Thank you for your continued support. Happy this is Python, which is great for taking apart and tinkering when problems arise.