Skip to content

Chicken doesn't seem to spawn #30

@AronicEbilond

Description

@AronicEbilond

I typed it in the comments section already, but I posted it here incase said comment gets deleted due to breaking youtubes TOS somehow. It can be seen on 2nd video in the tutorial playlist here;https://www.youtube.com/watch?v=-03rfhBZ8uY, and basically just, shares the code and some "possible" fixes I tried and all that. Most recently I even dowloaded the zip, yet even that somehow is not able to load the chicken and it has a totally different .obj file so https://imagetostl.com/convert/file/fbx/to/obj?status=expired#convert is probably not the problem.

Full error, as seen in copy of pyCraft_tut_2.py file here;
PS C:\Users\lordo> & "C:/Program Files/Python312/python.exe" "c:/Users/lordo/OneDrive/.GD/D_Exe/py()'s/ursina_tutorials-main/ursina_tutorials-main/python_minecraft_tut_2021/pyCraft_tut_2.py"
info: Using primary monitor: Monitor(x=0, y=0, width=1920, height=1080, width_mm=344, height_mm=193, name='\\.\DISPLAY1', is_primary=True)
:prc(warning): Invalid integer value for ConfigVariable win-size: 864.0
:prc(warning): Invalid integer value for ConfigVariable win-size: 1536.0
Known pipe types:
wglGraphicsPipe
(3 aux display modules not yet loaded.)
set window position: Vec2(192, 108)
:prc(warning): changing default value for ConfigVariable paste-emit-keystrokes from '1' to '0'.
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
package_folder: C:\Users\lordo\AppData\Roaming\Python\Python312\site-packages\ursina
asset_folder: c:\Users\lordo\OneDrive.GD\D_Exe\py()'s\ursina_tutorials-main\ursina_tutorials-main\python_minecraft_tut_2021
read obj at: c:\Users\lordo\OneDrive.GD\D_Exe\py()'s\ursina_tutorials-main\ursina_tutorials-main\python_minecraft_tut_2021\assets\minecraft-chicken\source\chicken.obj
Traceback (most recent call last):
File "C:\Users\lordo\AppData\Roaming\Python\Python312\site-packages\ursina\mesh.py", line 90, in _set_array_data
vmem[:] = a
~~~~^^^
ValueError: memoryview assignment: lvalue and rvalue have different structures

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\Users\lordo\OneDrive.GD\D_Exe\py()'s\ursina_tutorials-main\ursina_tutorials-main\python_minecraft_tut_2021\pyCraft_tut_2.py", line 129, in
chickenModel = load_model('chicken.obj')
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lordo\AppData\Roaming\Python\Python312\site-packages\ursina\mesh_importer.py", line 79, in load_model
m = obj_to_ursinamesh(path=path, name=name, return_mesh=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lordo\AppData\Roaming\Python\Python312\site-packages\ursina\mesh_importer.py", line 375, in obj_to_ursinamesh
return Mesh(
^^^^^
File "C:\Users\lordo\AppData\Roaming\Python\Python312\site-packages\ursina\mesh.py", line 69, in init
self.generate()
File "C:\Users\lordo\AppData\Roaming\Python\Python312\site-packages\ursina\mesh.py", line 183, in generate
self._set_array_data(vdata.modify_array(uv_attribute_index), self._ravel(self.uvs), 'f')
File "C:\Users\lordo\AppData\Roaming\Python\Python312\site-packages\ursina\mesh.py", line 92, in _set_array_data
raise Exception(f'Error in Mesh. Ensure Mesh is valid and the inputs have same length: vertices:{len(self.vertices)}, triangles:{len(self.triangles)}, normals:{len(self.normals)}, colors:{len(self.colors)}, uvs:{len(self.uvs)}')
Exception: Error in Mesh. Ensure Mesh is valid and the inputs have same length: vertices:264, triangles:0, normals:264, colors:0, uvs:264

And, yeah, its possibly just an issue with my installation of python, but I am unsure... An error is an error, with or without my computer's installation being the culprit I say.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions