Blender IndexError: bpy_prop_collection - python

I try write a game with GoranM/bdx plugin. When i create plate with texture and try export to code I get fatal error.
Traceback (most recent call last):
File "C:\Users\Myuser\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\bdx\ops\exprun.py", line 225, in execute
export(self, context, bpy.context.scene.bdx.multi_blend_export, bpy.context.scene.bdx.diff_export)
File "C:\Users\Myuser\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\bdx\ops\exprun.py", line 123, in export
bpy.ops.export_scene.bdx(filepath=file_path, scene_name=scene.name, exprun=True)
File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\modules\bpy\ops.py", line 189, in call
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
File "C:\Users\Myuser\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\bdx\exporter.py", line 903, in execute
return export(context, self.filepath, self.scene_name, self.exprun, self.apply_modifier)
File "C:\Users\Myuser\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\bdx\exporter.py", line 829, in export
"models": srl_models(objects, apply_modifier),
File "C:\Users\Myuser\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\bdx\exporter.py", line 117, in srl_models
verts = vertices(mesh)
File "C:\Users\Myuser\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\bdx\exporter.py", line 53, in vertices
vert_uv = list(uv_layer[li].uv)
IndexError: bpy_prop_collection[index]: index 0 out of range, size 0
location: C:\Program Files\Blender Foundation\Blender\2.79\scripts\modules\bpy\ops.py:189
location: :-1
Maybe someone had same problem and you know how to fix it?

Go into Object Mode before calling that function.
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

Related

How can I fix index out of range' error when generating a python code with Tkinter Designer from Figma?

This is the error I'm getting on my shell when I use the credentials to generate a python code on Tkinter Desingner:
window_data = self.file_data["document"]["children"][0]["children"][0]
IndexError: list index out of range
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.6/tkinter/__init__.py", line 1705, in __call__
return self.func(*args)
File "gui.py", line 72, in btn_clicked
designer.design()
File "/home/carol/Tkinter-Designer/tkdesigner/designer.py", line 29, in design
code = self.to_code()
File "/home/carol/Tkinter-Designer/tkdesigner/designer.py", line 21, in to_code
The Figma file:
https://www.figma.com/file/Zadkbq5PwiqK15LjxlFyWn/login?node-id=0%3A1

torchfile.T7ReaderException

I'm working on Windows 10. I get this issue:
DATAPATH: ../data/coco/test/val_captions.t7
Traceback (most recent call last):
File "main.py", line 77, in <module>
algo.sample(datapath, cfg.STAGE)
File "D:\documenti\Monica\StackGAN-Pytorch\code\trainer.py", line 243, in sample
t_file = torchfile.load(datapath)
File "C:\Users\Utente\venv\lib\site-packages\torchfile.py", line 424, in load
return reader.read_obj()
File "C:\Users\Utente\venv\lib\site-packages\torchfile.py", line 386, in read_obj
v = self.read_obj()
File "C:\Users\Utente\venv\lib\site-packages\torchfile.py", line 386, in read_obj
v = self.read_obj()
File "C:\Users\Utente\venv\lib\site-packages\torchfile.py", line 414, in read_obj
"unknown object type / typeidx: {}".format(typeidx))
torchfile.T7ReaderException: unknown object type / typeidx: -1112529805
Can anyone help me?
I installed python 3.6.8, pytorch, torchfile, torchvision, etc., and I'm working on virtualenv.

Decompyle .pyc failed

From my pyc file I got an error:
>>> from decompile import main
>>> main('','.',['D:\\uiexchange.pyc'])
### Can't decompyle D:\uiexchange.pyc
Traceback (most recent call last):
File "<pyshell#1>", line 1, in ?
main('','.',['D:\\uiexchange.pyc'])
File "decompile\__init__.py", line 161, in main
decompyle_file(infile, outstream, showasm, showast)
File "decompile\__init__.py", line 101, in decompyle_file
version, co = _load_module(filename)
File "decompile\__init__.py", line 49, in _load_module
co = marshal.load(fp)
ValueError: bad marshal data
this is my pyc file
http://www5.zippyshare.com/v/92967047/file.html
maybe do you know why I got this error, and how to fix it ?

Error while adding new code after 3200 lines in Python using IDLE

I have a python program which works fine and has 3200 lines of code. When I try to add new lines of code in it the following error appears:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
return self.func(*args)
File "C:\Python24\lib\idlelib\ScriptBinding.py", line 142, in run_module_event
code = self.checksyntax(filename)
File "C:\Python24\lib\idlelib\ScriptBinding.py", line 101, in checksyntax
return compile(source, filename, "exec")
SystemError: com_backpatch: offset too large

OSError: Result too large

I'am playing around with scapy but i cant get it to work. I tried different code's but all gave me the same output:
Traceback (most recent call last):
File "<module1>", line 7, in <module>
File "C:\Python26\lib\site-packages\scapy\sendrecv.py", line 357, in srp
s = conf.L2socket(iface=iface, filter=filter, nofilter=nofilter, type=type)
File "C:\Python26\lib\site-packages\scapy\arch\pcapdnet.py", line 313, in __init__
self.outs = dnet.eth(iface)
File "dnet.pyx", line 112, in dnet.eth.__init__
OSError: Result too large
Iam using python 2.6 with all dependencies installed for scapy.
How to fix this?

Categories