Python: Traceback (most recent call last):
File "C:\Users\[Username]\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\operators.py", line 310, in execute
app = ArCoreInterface(handler,port=prefs.port)
File "C:\Users\[Username]\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\arcore.py", line 144, in __init__
self._net_link = AppLink(handler, port=port)
File "C:\Users\[Username]\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\arcore.py", line 182, in __init__
self.command_socket.bind("tcp://*:{}".format(port+2))
File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\python\lib\site-packages\zmq\sugar\socket.py", line 172, in bind
super().bind(addr)
File "zmq\backend\cython\socket.pyx", line 540, in zmq.backend.cython.socket.Socket.bind
File "zmq\backend\cython\checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Address in use
location: <unknown location>:-1
Any help would be greatly appreciated!
Hi @Obliveater_95
This error happens when the background thread didn’t properly closed
To fix it you have to :
Close blender
check if there is any process named blender
in the task manager and kill them
Just found out about this today. I’m having no luck installing the addon. Tried 2.92 and 2.91… both ran as admin. Trying to tick the box to activate the addon causes the errors
2021-03-23 10:07:06,455 - smartphoneremote-master.environment - INFO - Installing module: zmq
Requirement already satisfied: zmq in c:\users\XXX\appdata\roaming\python\python37\site-packages (0.0.0)
Requirement already satisfied: pyzmq in c:\users\XXX\appdata\roaming\python\python37\site-packages (from zmq) (22.0.3)
2021-03-23 10:07:06,929 - smartphoneremote-master.environment - INFO - zmq module successfully installed.
2021-03-23 10:07:06,931 - smartphoneremote-master.environment - INFO - Installing module: msgpack
Requirement already satisfied: msgpack in c:\users\XXX\appdata\roaming\python\python37\site-packages (1.0.2)
2021-03-23 10:07:07,394 - smartphoneremote-master.environment - INFO - msgpack module successfully installed.
Exception in module register(): C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master_init_.py
Traceback (most recent call last):
File “C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\modules\addon_utils.py”, line 382, in enable*
mod.register()*
File “C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master_init_.py”, line 37, in register*
from . import settings, operators, preference,addon_updater_ops*
File “C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\settings.py”, line 28, in *
from . import environment, operators, preference*
File “C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\operators.py”, line 33, in *
from .arcore import ArCoreInterface, ArEventHandler*
File “C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\arcore.py”, line 18, in *
import zmq*
ModuleNotFoundError: No module named ‘zmq’
Any ideas?
Hi @JohnMalcolm1970,
Sometime, depending on the system configuration (python location, antivirus, folder authorizations, etc.), this problem can be solved by using a portable blender installation.
Can you try to:
download the blender portable (zip) version
Extract it in a folder were your user have the right (for instance in Download
)
Install the add-on on from this version
No joy I’m afraid Swann. I get the exact same error sequence with the portable version.
I took a look in the folder where the msgpack and zmq and stuff had been installed and there are other folders from February: PIL and PIP. I’ll need to try and work out what put them there. I think the only addon I have installed that does any kind of autoupdating is the Poliigon one.
Looking at my downloads and comparing them to the date where stuff has been put in that Python folder I can see I updated Boxcutter, HardOps and MeshMachine that day
Ok, then it must be related to your python installation.
In order to fix it, you can do a manual installation of the dependencies in blender with the following steps:
Navigate to your portable blender installation folder in the explorer
Navigate to the sub-folder 2.92/python/bin
Open a command prompt from this folder by typing cmd in the address bar
Run the command python.exe -m pip install zmq msgpack
Open blender and install the add-on
Right. That’s giving me this
C:\Users\xxx\Downloads\blender-2.92.0-windows64\blender-2.92.0-windows64\2.92\python\bin>python.exe -m pip install zmq msgpack
Requirement already satisfied: zmq in c:\users\xxx\appdata\roaming\python\python37\site-packages (0.0.0)
Requirement already satisfied: msgpack in c:\users\xxx\appdata\roaming\python\python37\site-packages (1.0.2)
Requirement already satisfied: pyzmq in c:\users\xxx\appdata\roaming\python\python37\site-packages (from zmq) (22.0.3)
Then the same errors when trying to install and activate the addon.
Do I need to remove those folders from the location mentioned to force the command to reinstall them in another place?
Thanks for you efforts, but I’m just about done trying for now. It’s frustrating and I had a molar extracted at the dentist inbetween my first and second messages
The uninstall procedure reported this:
C:\Users\xxx\Downloads\blender-2.92.0-windows64\blender-2.92.0-windows64\2.92\python\bin>python.exe -m pip uninstall zmq msgpack
Found existing installation: zmq 0.0.0
Uninstalling zmq-0.0.0:
Would remove:
c:\users\xxx\appdata\roaming\python\python37\site-packages\zmq-0.0.0-py3.7.egg-info
Proceed (y/n)? y
Successfully uninstalled zmq-0.0.0
Found existing installation: msgpack 1.0.2
Uninstalling msgpack-1.0.2:
Would remove:
c:\users\xxx\appdata\roaming\python\python37\site-packages\msgpack-1.0.2.dist-info*
c:\users\xxx\appdata\roaming\python\python37\site-packages\msgpack*
Proceed (y/n)? y
Successfully uninstalled msgpack-1.0.2
I then did the install and got this:
C:\Users\xxx\Downloads\blender-2.92.0-windows64\blender-2.92.0-windows64\2.92\python\bin>python.exe -m pip install zmq msgpack
Collecting zmq
Using cached zmq-0.0.0.zip (2.2 kB)
Collecting msgpack
Using cached msgpack-1.0.2-cp37-cp37m-win_amd64.whl (68 kB)
Requirement already satisfied: pyzmq in c:\users\xxx\appdata\roaming\python\python37\site-packages (from zmq) (22.0.3)
Using legacy ‘setup.py install’ for zmq, since package ‘wheel’ is not installed.
Installing collected packages: zmq, msgpack
Running setup.py install for zmq … done
Successfully installed msgpack-1.0.2 zmq-0.0.0
Then opened the portable version of Blender as an admin, installed the addon from ZIP and when I ticked the box I got:
C:\Users\xxx\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\environment.py:36: RuntimeWarning: Use ‘sys.executable’ instead of ‘binary_path_python’!
python_path = Path(bpy.app.binary_path_python)
Adding local modules dir to the path
2021-03-23 12:49:46,621 - smartphoneremote-master.environment - INFO - Installing module: zmq
Requirement already satisfied: zmq in c:\users\xxx\downloads\blender-2.92.0-windows64\blender-2.92.0-windows64\2.92\python\lib\site-packages (0.0.0)
Requirement already satisfied: pyzmq in c:\users\xxx\appdata\roaming\python\python37\site-packages (from zmq) (22.0.3)
2021-03-23 12:49:47,118 - smartphoneremote-master.environment - INFO - zmq module successfully installed.
Exception in module register(): C:\Users\xxx\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master_init_.py
Traceback (most recent call last):
File “C:\Users\xxx\Downloads\blender-2.92.0-windows64\blender-2.92.0-windows64\2.92\scripts\modules\addon_utils.py”, line 382, in enable
mod.register()
File “C:\Users\xxx\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master_init_.py”, line 37, in register
from . import settings, operators, preference,addon_updater_ops
File “C:\Users\xxx\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\settings.py”, line 28, in
from . import environment, operators, preference
File “C:\Users\xxx\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\operators.py”, line 33, in
from .arcore import ArCoreInterface, ArEventHandler
File “C:\Users\xxx\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\smartphoneremote-master\arcore.py”, line 18, in
import zmq
ModuleNotFoundError: No module named ‘zmq’
Managed to get it installed and activated finally. Now I just have to figure out what to do next. I ended up uninstalling everything I found in that Python folder (c:\users\xxx\appdata\roaming\python\python37\site-packages). I found I was having trouble getting PIP installed for MESHMachine too. I still am, but I’ll take that up with him.
Here’s my initial first test after getting it working. I decided to create a new scene with very simple proxy objects to keep things simple, then copied the camera from that over to my main scene when ready. I also found I’d moved my phone a little too unsteadily. I selectively smoothed some of the stuff in the Graph Editor to get it nearer what I was wanting.
Overall it’s very promising. II can see myself using this a hell of a lot.
I showed this test to some people in a Discord server I’m a member of and they were impressed with the addon. A couple were asking some interesting questions. The most obvious one was: Would it be possible to allow the phone or tablet to simultaneously record and store the “clean” video for the period camera data was also being captured? This would mean you’d be able to record the footage, the motion tracked camera movements and then later combine both of these with virtual objects. It would save users having to go through doing traditional motion tracking of a video.
Anyway… great work. I shall play with this some more
JohnMalcolm1970:
Would it be possible to allow the phone or tablet to simultaneously record and store the “clean” video for the period camera data was also being captured?
That’s a great idea ! I don’t think this is too hard to implement, I’ll add it in the gitlab issue todo list
Don’t hesitate to ask any other questions btw ^^