taichi-dev / taichi_three

A soft renderer based on Taichi (work in progress)
https://t3.142857.red/
MIT License
223 stars 24 forks source link

Attribute "Scene" not found #42

Open sg-first opened 3 years ago

sg-first commented 3 years ago

Hello!

I tried to install tina using pip and the code downloaded from GitHub. But when I run examples, they all reports errors:

AttributeError: module 'tina' has no attribute 'Scene'

What should I do?

Thank you!

FangCai-fifi commented 3 years ago

same issue for me, and when I added 'from tina.scene.raster import Scene', another error came out as: scene = Scene() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tina/scene/raster.py", line 14, in __init__ self.engine = tina.Engine(res) AttributeError: module 'tina' has no attribute 'Engine'

It seems to be relative with the lazy import function 'lazyguard()' in the source code. Temporarily, i simply changed the return False in site-packages/tina/lazimp.py to return True to disable lazy imports :(. Hope to get an official fix.