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

UnboundLocalError on Local Variable #7

Open
alexhasenclever opened this issue Jan 27, 2025 · 0 comments
Open

UnboundLocalError on Local Variable #7

alexhasenclever opened this issue Jan 27, 2025 · 0 comments

Comments

@alexhasenclever
Copy link

alexhasenclever commented Jan 27, 2025

Dear Developers,

User Story

I recently tried to run the SimGen/metadrive_simgen.py script to test the SimGen environment, but I found myself with a new issue.

Issue

When running the metadrive_simgen.py script, the following Traceback appears on the terminal:

Traceback (most recent call last):
File "/home/.../SimGen/metadrive_simgen.py", line 287, in
output = pipeline(
^^^^^^^^^
File "/home/.../SimGen/simgen/simgen.py", line 227, in call
images = self._process(
^^^^^^^^^^^^^^
File "/home/.../SimGen/simgen/simgen.py", line 139, in _process
H, W, C = resize_image(HWC3(anchor_image), image_resolution_h).shape
^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'anchor_image' where it is not associated with a value

How to reproduce the issue

  1. Install the last version of SimGen as detailed in the README file.
  2. Run "SimGen/metadrive_simgen.py"

Hardware

CPU: AMD Ryzen 9 7950X
GPU: Nivida GeForce RTX 4090
RAM: 32GB

Additional Information

Before running the metadrive_simgen.py script I tried the test/test.py script, and it worked as expected.
I tried to run the script a few times, with the "use_render" flag set to True and False. The log message I mentioned above, appears when running with the script "use_render = False". When rendering is enabled, Metadrive manages to open a rendering window, but Vs Code crashes completely before showing any output.

I thank you in advance and wish you a nice week.

Regards,
A. Hasenclever

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

1 participant