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

No module named 'network' when enabling #1

Open
dynjo opened this issue Feb 15, 2024 · 10 comments
Open

No module named 'network' when enabling #1

dynjo opened this issue Feb 15, 2024 · 10 comments

Comments

@dynjo
Copy link

dynjo commented Feb 15, 2024

image
@dynjo
Copy link
Author

dynjo commented Feb 15, 2024

I solved this by doing:

/Applications/Blender.app/Contents/Resources/4.0/python/bin/python3.10 -m pip install network

@dynjo dynjo closed this as completed Feb 15, 2024
@daniloc
Copy link
Owner

daniloc commented Feb 15, 2024

I'm not sure that's going to solve it for you, @dynjo. Is it possible you tried to install the folder instead of the zip file into Blender?

@dynjo
Copy link
Author

dynjo commented Feb 15, 2024

I did install the zip, but as soon as I clicked the enable checkbox in Blender prefs it threw the error. Manually installing network did solve that, but sadly still no connection to my AVP, so maybe another issue.

@daniloc daniloc reopened this Feb 15, 2024
@daniloc
Copy link
Owner

daniloc commented Feb 15, 2024

@dynjo Remove the add-on in Blender, then in Finder go to folder:

/Users/jan/Library/Application Support/Blender/4.0/scripts/addons/

Make sure "Blender Plugin" is not there. Then reinstall the add-on using the zip file again.

At that point, anything interesting in the logs when you switch over to the Scripting tab?

I just tried installing the zip from scratch and it gave me no trouble, so I'm hoping the logs can point us to where the hitch is.

@daniloc
Copy link
Owner

daniloc commented Feb 15, 2024

I don't know much about python, especially as it relates to naming collisions, but it also occurs to me that having pip remove the other "network" module you installed might help too.

@dynjo
Copy link
Author

dynjo commented Feb 15, 2024

Yeah sorry, you are of course correct, me installing network was just hiding the issue, which appears to be that my Blender Python install cannot resolve your network.py in the Geometry Link directory.

Also not a python expert, but I will keep fiddling with it 👍🏼

@daniloc
Copy link
Owner

daniloc commented Feb 15, 2024

@dynjo Grateful for the report! Keep me posted, this is the most brittle part of the whole affair so I'm eager to learn anything I can about it

@justbcuz
Copy link

@dynjo Were you able to resolve this? I am experiencing the exact same issue.

Screenshot 2024-04-12 at 1 00 45 PM

@dynjo
Copy link
Author

dynjo commented Apr 23, 2024

Sadly I didn't, sorry.

@BrianMila
Copy link

BrianMila commented May 2, 2024

Blender Plugin.zip

@dynjo @justbcuz I also had the same problem. I was sure it was a pathing issue, I messed with it for several hours with no success, and just before I gave up, I found the solution! It WAS a pathing issue, and my guess is that it actually wasn't working for @daniloc but maybe Blender found the source files in some path, but not from the zip. I have no idea how to send a PR for a public repo, sorry...But for anyone who might be waiting, or in case it doesn't get updated, here is the top of init.py that you need to make changes to, then zip up the Blender Plugin directory and install the zip as the plugin. I've attached the updated Blender Plugin that works for me.

import os
import sys
import bpy
from bpy.app.handlers import depsgraph_update_post

local_module_path=os.path.join(os.path.dirname(os.path.abspath(file)),'Geometry Link')
if local_module_path not in sys.path:
sys.path.append(local_module_path)

bl_info = {
"name": "Geometry Link",
"blender": (2, 80, 0),
"category": "Object",
"version": (1, 0, 0),
"author": "Danilo Campos",
"description": "Monitors geometry changes and serializes them to JSON",
}

import network
import os
import base64
import threading

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

4 participants