Python traceback most recent call last как исправить blender

I am having trouble migrating from Blender 2.92 to 2.93. Half of my addons will not install and they are officially supported on 2.93. When I install them, I get an error when I attempt to activate them. The thing is, this is only happening on Windows. I managed to successfully install all of my Addons on MacOS without any issues. I am an artist, not a programmer. Any ideas on what is going on are much appreciated!

The error below is from Botaniq (latest version and 2.93 supported). But the exact same message shows up for all the others.

    Traceback (most recent call last):
  File "C:UsersGABRIELAppDataRoamingBlender FoundationBlender2.93scriptsaddonsbotaniq_full__init__.py", line 30, in <module>
    from . import polygoniq_lib
  File "C:UsersGABRIELAppDataRoamingBlender FoundationBlender2.93scriptsaddonsbotaniq_fullpolygoniq_lib__init__.py", line 9, in <module>
    from . import telemetry_module as telemetry_native_module
  File "C:UsersGABRIELAppDataRoamingBlender FoundationBlender2.93scriptsaddonsbotaniq_fullpolygoniq_libtelemetry_module.py", line 9, in <module>
    import multiprocessing
  File "D:SteamsteamappscommonBlender2.93pythonlibmultiprocessing__init__.py", line 16, in <module>
    from . import context
  File "D:SteamsteamappscommonBlender2.93pythonlibmultiprocessingcontext.py", line 6, in <module>
    from . import reduction
  File "D:SteamsteamappscommonBlender2.93pythonlibmultiprocessingreduction.py", line 16, in <module>
    import socket
  File "D:SteamsteamappscommonBlender2.93pythonlibsocket.py", line 51, in <module>
    import _socket
ImportError: Module use of python38.dll conflicts with this version of Python.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:SteamsteamappscommonBlender2.93scriptsmodulesaddon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:UsersGABRIELAppDataRoamingBlender FoundationBlender2.93scriptsaddonsbotaniq_full__init__.py", line 32, in <module>
    import polygoniq_lib
ModuleNotFoundError: No module named 'polygoniq_lib'

Last things first.
It is the correct version, I took the text from Blender as I’ve too many Betas to count. ;) Would you check the version displayed in Blender Preferences, please?
As for installing it in the latest version of Blender. I still have problems and I have had to do 3 System Restores.
I’ve stopped for the moment while I think. I did not un-install Ver 2.8 so both were in the registry. :(
What I did see was that the folders:
Stop- motion-OBJ;
Stop- motion-OBJ -0.2.79.2;
Stop- motion-OBJ -2.0.0 in
AppData > Roaming > BlenderFoundation > Blender > 2.83 > scripts > addons

The last time I tried to install Stop_motion in 2.83 it seemed to install but when I tried to activate it. I got the errors:

Traceback (most recent call last):
File «C:Proglam FilesBlender FoundationBlender 2.832.83Scriptsmodulesaddon_utils.py», line 351, in enable
mod = import(module_name)
ModuleNotFoundError: No module named ‘Stop-motion-OBJ-2’

I installed Blender 2.6 and I’m trying to run a script called drawcar.py (Which uses PyOpenGL)

I looked around the documentation for importing a script and could only access Blender’s python console.

How do I run drawcar.py from the Linux terminal with Blender?

asked Jul 22, 2012 at 22:38

CyberShot's user avatar

1

You can also execute the following code in the python console to execute an external script without opening it up in the text editor:

filename = "/full/path/to/myscript.py"
exec(compile(open(filename).read(), filename, 'exec'))

The above code comes from the following link:

Blender — Tips and Tricks

answered Oct 2, 2012 at 0:54

Raunaq's user avatar

RaunaqRaunaq

1,8231 gold badge14 silver badges19 bronze badges

2

  1. Open a Text Editor view in Blender.
  2. Press Alt + O, or go to Text>Open Text Block and open the .py file
  3. Then simply press Run script :D

P.s. Instead of opening a file in step 2, you can also hit the «+ New» button and create a new script instead.

Note : In newer versions the Run Script button label has been replaced with a Play icon : enter image description here

Gorgious's user avatar

answered Jul 22, 2012 at 22:44

Ertyui's user avatar

ErtyuiErtyui

8389 silver badges18 bronze badges

7

this answer is too late, but to help anyone with the same problem

via the terminal:

blender yourblendfilenameorpath --python drawcar.py 

from the man pages

       -P or --python <filename>
              Run the given Python script file.

Nick Brady's user avatar

Nick Brady

5,9541 gold badge45 silver badges71 bronze badges

answered Apr 19, 2017 at 16:46

enas's user avatar

enasenas

1711 silver badge3 bronze badges

1

To run a script by another script or from console:

import bpy

script = bpy.data.texts["script_name.py"]
exec(script.as_string())

answered Mar 31, 2015 at 14:42

Jerryno's user avatar

JerrynoJerryno

8918 silver badges16 bronze badges

0

It is likely that drawcar.py is trying to perform pyOpenGL commands inside Blender, and that won’t work without modification. I suspect you are getting some import errors too (if you look at the command console). Blender has it’s own internal python wrapper for opengl called bgl, which does include a lot of the opengl standards, but all prefixed by bgl.

If you have a link to drawcar.py I can have a look at it and tell you what’s going on.

answered Oct 5, 2012 at 18:42

zeffii's user avatar

zeffiizeffii

5349 silver badges22 bronze badges

Blender Artists Community

Loading

—python-console

enter the blender command line with:

blender --background --python-console

From the command prompt this will bring you into the python command line where you can test python script one line at a time.
Always to start we must import the bpy module, this gives us access to blender functions so we can generate elements like: grease pencil objects, 3d meshes, animation, metaballs and more.

import bpy
bpy.data.objects[10]

bpy.data.objects[N]

Traceback (most recent call last):
  File "", line 1, in 
KeyError: 'bpy_prop_collection[key]: key "10" not found'

Above is a very common error when writing bpy scripts. This error is similar to an index out of range error from a standard python list. When you encounter this error it means that you have requested an item by number index, and the number is greater than the number of items in the collection.

bpy.data.objects[«N»]

KeyError: 'bpy_prop_collection[key]: key "N" not found'

Above is another common error that looks similar to a python dictionary lookup error. This error means that the requested object name is not in the current blender scene.

bpy_prop_collection

bpy_prop_collection is the standard collection type that blender provides in the python interface.
It is a collection type that has features of both a python list and python dictionary. In other words, you can get objects by name or index. This has some major pros and cons, getting an object by name is not always consistent, because blender enforces unique names for each object, and when the user renames and object, if if the requested name already exists, blender will append .001 to the name. This complicates game logic that is depending on objects and getting them by name.

for object in bpy.data.objects

for ob in bpy.data.objects:
   print(ob.name)
   print(ob.location)

Above will loop thru all the objects in the current blender scene and print their name and location (position).

Понравилась статья? Поделить с друзьями:
  • Как составить схему погрузки
  • Как найти свой регион по названию
  • Как найти работу водителя в белоруссии
  • Как в мультикрафте найти деревню
  • Как найти колво теплоты зная