-
Notifications
You must be signed in to change notification settings - Fork 2
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
ModuleNotFoundError: No module named 'system_equations' #3
Comments
Hi! indeed I suspect this to be an issue related to the particular Python kernel that you are using and the way that PyRates updates path variables to register newly created files. Unfortunately, I have no experience with WSL either. What kind of Python environment are you using to run the example within WSL? Personally, I have had quite some issues with calling Auto-07p from a Python environment on Windows. In any case, since the file
instead. That should allow you to run parameter continuations etc. via the Let me know how it goes! |
Sorry for the late response. I'm a bit unsure what you mean by "Python environment" and "kernel"? Again, new to the whole WSL/Linux stuff 😅. I tried downloading PyCoBi first using the ´python setup.py install´ but had some issues and went with pip instead. Now your fix doing IndexError Traceback (most recent call last)
/tmp/ipykernel_8587/2465527202.py in <module>
----> 1 ode.plot_continuation("PAR(14)", "U(1)", cont=0)
2 plt.show()
/usr/local/lib/python3.10/dist-packages/pycobi-0.8.8-py3.10.egg/pycobi/pycobi.py in plot_continuation(self, x, y, cont, ax, force_axis_lim_update, bifurcation_legend, **kwargs)
660 # plot main continuation
661 x_data, y_data = results[x], results[y]
--> 662 line_col = self._get_line_collection(x=x_data.values, y=y_data.values, stability=results['stability'], **kwargs)
663 ax.add_collection(line_col)
664 ax.autoscale()
/usr/local/lib/python3.10/dist-packages/pycobi-0.8.8-py3.10.egg/pycobi/pycobi.py in _get_line_collection(x, y, stability, line_style_stable, line_style_unstable, line_color_stable, line_color_unstable, **kwargs)
1171 add_min = True
1172 else:
-> 1173 y = np.reshape(y, (y.squeeze().shape[0], 1))
1174 add_min = False
1175 y = np.append(x, y, axis=1)
IndexError: tuple index out of range Or when trying to run ---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
/tmp/ipykernel_8587/2170331206.py in <module>
----> 1 ode.plot_continuation('PAR(4)', 'U(1)', cont='eta')
2 plt.show()
/usr/local/lib/python3.10/dist-packages/pycobi-0.8.8-py3.10.egg/pycobi/pycobi.py in plot_continuation(self, x, y, cont, ax, force_axis_lim_update, bifurcation_legend, **kwargs)
641 results['bifurcation'] = np.asarray(['RG'] * len(results[x]))
642 else:
--> 643 results, vmap = self.extract([x, y, 'stability', 'bifurcation'], cont=cont)
644 x, y = vmap[x], vmap[y]
645
/usr/local/lib/python3.10/dist-packages/pycobi-0.8.8-py3.10.egg/pycobi/pycobi.py in extract(self, keys, cont, point)
594 summary = self.get_summary(cont, point=point)
595 columns = [k for k, _ in list(summary.keys())]
--> 596 keys_new = [key if key in columns else self._var_map_inv[key] for key in keys]
597 key_map = {key_old: key_new for key_old, key_new in zip(keys, keys_new)}
598 if point:
/usr/local/lib/python3.10/dist-packages/pycobi-0.8.8-py3.10.egg/pycobi/pycobi.py in <listcomp>(.0)
594 summary = self.get_summary(cont, point=point)
595 columns = [k for k, _ in list(summary.keys())]
--> 596 keys_new = [key if key in columns else self._var_map_inv[key] for key in keys]
597 key_map = {key_old: key_new for key_old, key_new in zip(keys, keys_new)}
598 if point:
KeyError: 'PAR(4)' Similar errors occurred when I tried to do the Hopf Bifurcation example. Thanks again for your time and aid. |
Hi @2BeAsh , yeah from your output I can see that you are running an Regarding the issues you posted, a couple of things:
So based on that you will see that the first, automatic continuation over the time parameter ("PAR(14)") immediately fails. I suggest that you set Let me know if you run into the same issue. Make sure that you adjust the parameters |
Issue
When trying to run this example on the documentation I get the following error:
ModuleNotFoundError: No module named 'system_equations'
This might be an issue of pathing, as the file "system_equations.f90 is correctly produced in the same folder as my script. I should note that I'm running auto and PyCoBi using WSL, which I have minimal experience with, and that might be the real issue. I can use auto without PyCOBi just fine.
What I tried
In the example, I changed the auto_dir line to:
auto_dir = "~/auto/07p/"
,as that is where I have installed auto. Not sure if it matters, but the script running the PyCoBi example is located in a directory ~/test_files/. I also tried adding ~/auto/07p/ to PATH. Further, I tried playing with the 'fortran_backend.py' file in which the error occurs, such as adding folders to path using the sys library's
path.append
- I of course made to remove any of those edits afterwards.The full script
Thanks in advance. This is the first posting an issue on GitHub, so I hope I'm doing it right. If not, let me know and I'll make any necessary edits.
Have a nice day.
The text was updated successfully, but these errors were encountered: