UPBGE / UPBGE-logicnodes

A Node-based Logic system for UPBGE 2.8+
Other
53 stars 18 forks source link

ModuleNotFoundError #71

Open mahesh0806 opened 2 years ago

mahesh0806 commented 2 years ago

Adding logic nodes on mac does not work. Logic Bricks work. After running the game and hitting Esc it shows following error:

[ERROR] KX_PythonComponent[NodeTree] - Failed to invoke the start callback. Traceback (most recent call last): File "/Users/mahesh/Desktop/untitled1.blend/nl_nodetree.py", line 58, in start File "/Users/mahesh/Desktop/untitled1.blend/nl_nodetree.py", line 11, in init ModuleNotFoundError: No module named 'uplogic'

IzaZed commented 2 years ago

Did you press the "install or update uplogic module" button in the addon preferences? There have been cases where this doesn't work on some iOS machines, if that's the case you might need to install uplogic manually into the python installation of your UPBGE version

mahesh0806 commented 2 years ago

Thank you very much @IzaZed Yes, I pressed "install or update uplogic module" button. But it didn't worked. So, where can I find the process to "install uplogic manually into the python installation of your UPBGE version" Thank you in advance

IzaZed commented 2 years ago

Since it's been reported that sometimes even manually installing via PIP isn't working for iOS, I'll provide the "hacky" way

First you need to locate the python package installation, for iOS I don't know if it's the same, but for Linux and Windows it's under ".../Release/3.0/python/lib/site-packages/" you need to place the uplogic folder in there (you can get that here: https://github.com/UPBGE/uplogic) Keep in mind that you need the folder that has the "init.py" file in it alongside of some folders

mahesh0806 commented 2 years ago

Oh Great, Thanks, Your "hack" worked! Now logic nodes are functioning.

For everybody's reference, this is how it worked. I am using a Mac (macOS 12.5.1). And my UPBGE version is (UPBGE 0.34.0 alpha)

  1. I downloaded the zip file (uplogic-master.zip) from: https://github.com/UPBGE/uplogic
  2. I extracted it and copied (cmd + c) the 'uplogic' folder inside it. (It should contain a 'init.py' file)
  3. Earlier, I have moved my UPBGE.app to a specific location (mentioned below), as it was needed for the 'Blenderplayer.app' to work for exporting the Game to .app (like .exe).
  4. (Your path may vary) but my updated UPBGE 'Blender.app' path is /private/var/folders/h_/1z0tb7xd5rv8507q0bmzzwkc0000gr/T/AppTranslocation/EB8723B4-BE82-4F0F-96FD-9AABAA14E07B/d/Blender.app
  5. There I Right Clicked on the Blender.app and choose 'Show Package Contents'. This will show all data inside the app.
  6. Inside it I went to: 'Blender.app/Contents/Resources/3.4/python/lib/python3.10/site-packages'
  7. Here inside the 'site-packages' folder I pasted (cmd + v) the 'uplogic' folder.
  8. Next when I tested the UPBGE blender app the logic nodes were working.
  9. Although, when I exported the app the node's logic didn't worked. I am trying to solve it now.

    But thanks to @IzaZed for the 'hack'.

Orlando929 commented 1 year ago

Também estou tendo problemas no Módulo uplogic mas na versão actualizada da UPBGE 0.36

Mesmo seguindo os passos acima, não estou conseguindo solucionar.