sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
287 stars 140 forks source link

No module found despite the file being found in the correct directory #110

Closed joseph-yclam closed 3 years ago

joseph-yclam commented 3 years ago

Describe the bug Encountered an error, ModuleNotFoundError: No module named 'simba.sklearn_plot_scripts.plot_sklearn_results_2_single' despite the "plot_sklearn_results_2_single" being located in the "sklearn_plot_scripts" folder.

To Reproduce Steps to reproduce the behavior:

  1. Open simba through Visual Studio.
  2. Locate the "SimBA.py" file
  3. Run it

Screenshots image

image

Desktop (please complete the following information):

Additional context For context, I am looking at editing some of the GUI code to change.

sgoldenlab commented 3 years ago

Hello @joseph-yclam! I think - if you run SimBA through an IDE like VS - the working directory changes, so plot_sklearn_results_2_single.py is at sklearn_plot_scripts.plot_sklearn_results_2_single.py and not simba.sklearn_plot_scripts.plot_sklearn_results_2_single.py - could you try and remove the simba directory part and see if that fixes it in VS? There will be a fair few simba to remove.

joseph-yclam commented 3 years ago

Hello @sgoldenlab ! Thank you, I tried removing the simba directory part and it worked! However, I am still encountering a ModuleNotFoundError:

image

Even when I remove the simba portion, it still is unable to find the module "import_solomon"?

image

sgoldenlab commented 3 years ago

@joseph-yclam thanks for reporting - the git repo has been lagging behind the pypi packages and some scripts was missing in the repo. If you clone it again the missing files (solomon import etc) should be there.

That said, beware, launching SimBA GUI from the VS IDE and SimBA.py won't work, if you want to launch the GUI try running the App.py located outside the SimBA folder. If you however want to play around with the scripts, then yes use VS.

Also, if you want to make sure you work with the latest version of SimBA, you could download SimBA through pip install simba-uw-tf-dev and access the files in the C:\Python36\Lib\site-packages\simba (or wherever your Python installation is).