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

Assertion error when running fusesoc simulation #67

Open
MoonisAmir10 opened this issue Aug 29, 2023 · 6 comments
Open

Assertion error when running fusesoc simulation #67

MoonisAmir10 opened this issue Aug 29, 2023 · 6 comments

Comments

@MoonisAmir10
Copy link

MoonisAmir10 commented Aug 29, 2023

Im using ubuntu 18.04 in WLS. When running the command : sudo fusesoc run --target=sim veerwolf, I get the following error:

INFO: Generating ::veerwolf-veer_eh1_default_config:0.7.5
Traceback (most recent call last):
File "/usr/local/bin/fusesoc", line 11, in
load_entry_point('fusesoc==2.2.1', 'console_scripts', 'fusesoc')()
File "/usr/local/lib/python3.6/dist-packages/fusesoc/main.py", line 766, in main
fusesoc(args)
File "/usr/local/lib/python3.6/dist-packages/fusesoc/main.py", line 756, in fusesoc
args.func(cm, args)
File "/usr/local/lib/python3.6/dist-packages/fusesoc/main.py", line 305, in run
args.resolve_env_vars_early,
File "/usr/local/lib/python3.6/dist-packages/fusesoc/main.py", line 436, in run_backend
backend = backend_class(edam=edam, work_root=work_root, verbose=verbose)
File "/usr/local/lib/python3.6/dist-packages/edalize/edatool.py", line 182, in init
loader=PackageLoader(package, "templates"),
File "/usr/local/lib/python3.6/dist-packages/jinja2/loaders.py", line 291, in init
assert loader is not None, "A loader was not found for the package."
AssertionError: A loader was not found for the package.

Any idea on how to fix it?

@olofk
Copy link
Collaborator

olofk commented Aug 29, 2023

Hmm... I haven't seen an error like this before. Looking at the error message it seems like there is something strange with the installation of edalize.

Could you try running python -c "import edalize;print(edalize.__package__)" from the terminal? I expect the result to be edalize but from your error message it looks like it will be None.

@MoonisAmir10
Copy link
Author

Hmm... I haven't seen an error like this before. Looking at the error message it seems like there is something strange with the installation of edalize.

Could you try running python -c "import edalize;print(edalize.__package__)" from the terminal? I expect the result to be edalize but from your error message it looks like it will be None.

It says: "ImportError: No module named edalize".

@olofk
Copy link
Collaborator

olofk commented Aug 29, 2023

Ok, this just gets more and more strange :)
Did you install fusesoc with pip? If so, could you try pip install --upgrade edalize and see if that helps?

@MoonisAmir10
Copy link
Author

Ok, this just gets more and more strange :) Did you install fusesoc with pip? If so, could you try pip install --upgrade edalize and see if that helps?

It says that requirement is already satisfied:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: edalize in /usr/local/lib/python3.6/dist-packages (0.5.1)
Requirement already satisfied: Jinja2>=3 in /usr/local/lib/python3.6/dist-packages (from edalize) (3.0.3)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.6/dist-packages (from Jinja2>=3->edalize) (2.0.1)

@cycurain
Copy link

cycurain commented Nov 13, 2023

**james@james-VirtualBox: /SweRVolf$ fusesoc run --target=nexys_a7 veerwolf
INFO: Generating ::veerwolf-veer_eh1_default_config:0.7.5
Traceback (most recent call last):
File "/home/james/.local/bin/fusesoc", line 11, in
sys.exit(main())
File "/home/james/.local/lib/python3.6/site-packages/fusesoc/main.py", line 766, in main
fusesoc(args)
File "/home/james/.local/lib/python3.6/site-packages/fusesoc/main.py", line 756, in fusesoc
args.func(cm, args)
File "/home/james/.local/lib/python3.6/site-packages/fusesoc/main.py", line 305, in run
args.resolve_env_vars_early,
File "/home/james/.local/lib/python3.6/site-packages/fusesoc/main.py", line 436, in run_backend
backend = backend_class(edam=edam, work_root=work_root, verbose=verbose)
File "/home/james/.local/lib/python3.6/site-packages/edalize/vivado.py", line 93, in init
super().init(edam, work_root, eda_api, verbose)
File "/home/james/.local/lib/python3.6/site-packages/edalize/edatool.py", line 182, in init
loader=PackageLoader(package, "templates"),
File "/home/james/.local/lib/python3.6/site-packages/jinja2/loaders.py", line 291, in init
assert loader is not None, "A loader was not found for the package."
AssertionError: A loader was not found for the package.
james@james-VirtualBox:~/SweRVolf$ python -c "import edalize;print(edalize.package)"
edalize

even install edalize , the error message happen assert loader is not None, "A loader was not found for the package."
I write some print code to get informations in "loaders.py"

package_name: edalize
spec: ModuleSpec(name='edalize', loader=None, origin='namespace', submodule_search_locations=_NamespacePath(['/home/james/.local/lib/python3.6/site-packages/edalize', '/home/james/.local/lib/python3.6/site-packages/edalize', '/usr/local/lib/python3.6/dist-packages/edalize']))
loader: None

Could you help me to resolve the problem, thanks**

@yaanng2022
Copy link

I got the same problem ,when I was running python -c "import edalize;print(edalize.package)" ,I got edalize.Can you give me some advice about what I can do to resolve the problem?

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

4 participants