Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug/Question] AttributeError: module 'drjit' has no attribute 'syntax' #22

Open
willytrek opened this issue Nov 29, 2024 · 3 comments
Open

Comments

@willytrek
Copy link

willytrek commented Nov 29, 2024

https://mitsuba.readthedocs.io/en/stable/src/rendering/scripting_renderer.html
image

When I try to run this code in PyCharm, I encounter the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[58], line 4
      1 # Accumulated result
      2 result = mi.Float(0)
----> 4 @dr.syntax
      5 def my_loop(result, si, rng, ambient_ray_count):
      6     # Loop iteration counter
      7     i = mi.UInt32(0)
      9     while (si.is_valid() & (i < ambient_ray_count)):
     10         # 1. Draw some random numbers

AttributeError: module 'drjit' has no attribute 'syntax'
@wjakob
Copy link
Member

wjakob commented Nov 29, 2024

You need to upgrade Mitsuba and Dr.Jit to the latest version

@willytrek
Copy link
Author

willytrek commented Nov 29, 2024

Thank you for your prompt reply. However, I have updated the code, and the issue still persists.

PS C:\GitHub\mitsuba> pip install --upgrade mitsuba drjit
Requirement already satisfied: mitsuba in ...\python\python38\lib\site-packages (3.6.0)
Requirement already satisfied: drjit in ...\python\python38\lib\site-packages (1.0.1)
Requirement already satisfied: typing_extensions>=4.12 in ...\python\python38\lib\site-packages (from mitsuba) (4.12.2)

@wjakob
Copy link
Member

wjakob commented Nov 29, 2024

What is drjit.__version__? I suspect you have different versions installed, maybe in different Python environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants