pythonvoxelursina

How do I fix python ursina error in voxel game


In my python project I get an error like this:

package_folder: C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina asset_folder: e:\Dimiland\Programiranje\Python\Visual Studio Code\Games screen resolution: (1440, 900) Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Exception ignored in: <function Texture.del at 0x00000249051B55A0> Traceback (most recent call last): File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\texture.py", line 186, in del del self._cached_image AttributeError: _cached_image Traceback (most recent call last): File "e:\Dimiland\Programiranje\Python\Visual Studio Code\Games\Game 01.py", line 24, in player = FirstPersonController() File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\prefabs\first_person_controller.py", line 32, in init ray = raycast(self.world_position+(0,self.height,0), self.down, ignore=(self,)) File "C:\Users\POM\AppData\Local\Programs\Python\Python310\lib\site-packages\ursina\entity.py", line 425, in world_position return Vec3(self.get_position(render)) NameError: name 'render' is not defined

This is my code:

    from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController

app = Ursina

class Voxel(Button):
    def __init__(self, position = (0,0,0)):
        super().__init__(
            parent = scene,
            position = position,
            model = 'cube',
            texture = 'white_cube',
            color = color.white,
            highlight_color = color.lime,
            origin_y = 0.5,
            scale = 0.5
            )

for z in range(8):
    for x in range(8):
        voxel = Voxel(position = (x,0,z))


player = FirstPersonController()

voxel = Voxel()

app.run

HOW TO FIX THIS??>


Solution

  • You forgot the ().

    app = Ursina should be app = Ursina().