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

Cannot debug and open blender project automatically #1007

Open
MeloHX opened this issue Nov 27, 2023 · 2 comments
Open

Cannot debug and open blender project automatically #1007

MeloHX opened this issue Nov 27, 2023 · 2 comments
Labels
question Question, not yet a bug ;)

Comments

@MeloHX
Copy link

MeloHX commented Nov 27, 2023

Describe the issue

When I tried to debug a script(quickstart.py), the program control opened blender, but it didn't automatically open the project file and couldn't debug

Minimal code example

No response

Files required to run the code

No response

Expected behavior

According to your tutorial, when I debug quickstart.py, it should automatically open blender and Blender UI opens up, the scripting tab is selected and the correct script is loaded. But it did not work when I debug .
微信图片_20231127161344

BlenderProc version

v2.6.1

@MeloHX MeloHX added the question Question, not yet a bug ;) label Nov 27, 2023
@cornerfarmer
Copy link
Member

Could you please copy here the command line output, so I can see if there are any errors?

@Varatharajan-Raja
Copy link

For me it does open with the codes. However, I have a different issue, it opens only with import lines on the top than the comments.

(.bpenv) raja@raja-HP-Pavilion-Gaming-Laptop-15-dk1xxx:~/Raja/synthetic_image$ blenderproc debug BlenderProc/blenderproc/scripts/quickstart.py 
Using blender in /home/raja/Raja/synthetic_image/blender-3.3.1-linux-x64/
Traceback (most recent call last):
  File "/home/raja/Raja/synthetic_image/.bpenv/bin/blenderproc", line 33, in <module>
    sys.exit(load_entry_point('blenderproc', 'console_scripts', 'blenderproc')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/raja/Raja/synthetic_image/BlenderProc/blenderproc/command_line.py", line 147, in cli
    SetupUtility.check_if_setup_utilities_are_at_the_top(path_src_run)
  File "/home/raja/Raja/synthetic_image/BlenderProc/blenderproc/python/utility/SetupUtility.py", line 405, in check_if_setup_utilities_are_at_the_top
    raise RuntimeError(f'The given script "{path_to_run_file}" does not have a blenderproc '
RuntimeError: The given script "BlenderProc/blenderproc/scripts/quickstart.py" does not have a blenderproc import at the top! Make sure that is the first thing you import, as otherwise the import of third-party packages installed in the blender environment will fail.
Your code:
#####################
"""
The quickstart example:
""####################
Replaces this with:
""import blenderproc as bproc"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question, not yet a bug ;)
Projects
None yet
Development

No branches or pull requests

3 participants