In my python project Ihave this code: The code throws error of NameError: name 'render' is not defined
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 ERROR BELOW??>
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 <module>
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
You forgot the ()
.
app = Ursina
should be app = Ursina()
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.