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

Circular import error #49

Open
oyendrila-dobe opened this issue Dec 7, 2021 · 7 comments
Open

Circular import error #49

oyendrila-dobe opened this issue Dec 7, 2021 · 7 comments

Comments

@oyendrila-dobe
Copy link

I'm trying to use the parse_prism_program method. The python script can recognize all the other modules except the core module. I have installed stormpy in a directory, and moved the lib/stormpy and lib/stormpy.egg-info into a folder with my python scripts that calls stormpy. Is there something I'm doing wrong or missing out? What should I do to make python recognize the core module? I did try to specifically import stormpy.core, but the error is still the same.

Screen Shot 2021-12-07 at 12 44 37 PM

@volkm
Copy link
Contributor

volkm commented Dec 10, 2021

Copying python files might lead to some problems, because the file structure can change. You can try to get your current setup to work, but I cannot be of much help there.
My recommendation is to use a virtual environment and install stormpy according to our guide. In that case you can install stormpy in a custom folder of your choice and do not need to copy any files.

@oyendrila-dobe
Copy link
Author

that makes sense. Thank you.

@culechetoo
Copy link

culechetoo commented Jan 31, 2024

I also got this error. I installed version 1.8.0 using the given instructions. I am using a virtual environment with Python 3.10. I have attached the setup and test logs.

test.log
setup.log

@volkm
Copy link
Contributor

volkm commented Feb 1, 2024

I think the issue comes from missing libraries. You are building stormpy without the optional libraries for parameters, POMDPs, etc. However, some of the examples are checking for these.
Can you try to run the following?

pip install pytest
python -m pytest tests

This should only run some of the tests and skip the ones for the optional libraries.

@volkm volkm reopened this Feb 1, 2024
@culechetoo
Copy link

I now got the following output.

ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: --nbval
inifile: /Users/cgarwal/PycharmProjects/stormpy/setup.cfg
rootdir: /Users/cgarwal/PycharmProjects/stormpy

@volkm
Copy link
Contributor

volkm commented Feb 2, 2024

Try pip install nbval for the missing library.

@culechetoo
Copy link

Thanks. Now I see that several tests are skipped but it goes through.

However, I believe I followed the installation path for all dependencies (carl and storm) that installed all recommended libraries. Based on the test log above, could you tell me if I perhaps missed a step or is the documentation lacking?

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

3 participants