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
272 stars 137 forks source link

Unable to Start Simba GUI #348

Closed heiley8181 closed 1 month ago

heiley8181 commented 3 months ago

Hello simba team,

I successfully installed Simba via the Anaconda Prompt and managed to launch it. However, the application freezes immediately upon launch, and I do not receive any error messages in the prompt either.

image

I have reviewed the FAQ section on the Simba website but was unable to find a solution to my issue. At this point, I suspect the problem might be related to my GPU. I've included my GPU details below for your reference.

image

Let me know what I can try to resolve this issue.

Thank you so much in advance!

sronilsson commented 3 months ago

Hi @heiley8181! Odd one and tricky without a traceback error message so I will have to ask some questions to dig - but I don't think it comes down to the GPU.

Did you install SimBA by cloning the git repository, or via pip with pip install simba-uw-if-dev?

Which version of SimBA do you see when you type pip show simba-uw-if-dev?

Which version of python do you see when typing python --version in the terminal?

If you open the terminal in admin mode, and then launch SimBA, do you still see the same error?

heiley8181 commented 3 months ago

Hello @sronilsson ,

Using anaconda navigator -> I typed python --version and got 3.6.15

I installed SimBA using Anaconda using the pip install method.

When I type pip show simba-uw-if-dev in the working directory, I get a warning message that says: Warning Package(s) not found: simba-uw-if-dev. So I tried the pip install method in the virtual environment I created (simba-test) and got this error message.

image

Lastly, I still see the same error when I open the terminal in admin mode.

Let me know what I can try to fix this issue! Thank you in advance.

sronilsson commented 3 months ago

Hey @heiley8181 !

i) The last screenshot contains some typos - it should be pip show simba-uw-tf-dev, not pip install simba-uw-if-dev.

ii) In the first screengrab, when you try to launch SimBA, I see no error messages, but I do see these what looks like cursor line selections. Line selections like this can lock the the terminal and prevent it from printing useful information, including what went wrong.

image

Do you see any error messages in the Windows terminal when trying th launch SimBA without these line selections?

heiley8181 commented 3 months ago

Thanks for the response, @sronilsson!

I tried what you suggested and this is the warning message I received in the terminal: image

Also, launching simba without the cursor line selection still shows no errors.

-Heiley

sronilsson commented 3 months ago

Oh you still got the typo - you see you have written simba-uw-tf-dev rather than simba-uw-if-dev - you should substitute the if for tf.

Simon

heiley8181 commented 3 months ago

Oops thanks for pointing that out. The version I have is 1.87.5

sronilsson commented 3 months ago

Everything looks in order...

i) Do you have any other versions of simba installed in the same environment? I.e., if you type pip show simba-uw-tf in the same conda environment, what do you see?

ii) You can create a list of all the packages in your simba environment and I can take a look at it if I see anything odd. if you type conda list -e > requirement.txt, this will create a text file of all the packages installed in the environment. Can you create it and drop it here in the chat?

heiley8181 commented 3 months ago
  1. If I type pip show simba-uw-tf in the simba-test environment, I get WARNING: Package(s) not found: simba-uw-tf

  2. requirement.txt This is the text file. Hope this helps to tackle the issue :)

-Heiley

sronilsson commented 3 months ago

Thanks @heiley8181! I will create conda environment from the txt to see if I can recreate the error. One final question for now you may have told me already but can't find it..

What is the operating system you run, is it windows 10 or 11?

heiley8181 commented 3 months ago

Hi @sronilsson , I am currently running on Windows 10.

Thank you!

-Heiley

sronilsson commented 2 months ago

Hi @heiley8181 ! Sorry for the delay on this, but I have tried and can't recreate the error 🤷🏻‍♂️ That said, I don't have access to Windows 10 machine, I only have Win11 so I can't fully follow your workflow.

heiley8181 commented 2 months ago

Hi @sronilsson ,

Thank you for the update. One thing I noticed is that in the task manager, python is not responding and when I close the blank simba GUI, I get a pop up that says python is not responding. Do you think I should try other versions of python in this case?

sronilsson commented 2 months ago

Hi @heiley8181 - I don't think it is the python version, my thinking it is something to do with Windows 10.. I gave environment ago on Windows 11, and in Ubuntu 20/22, and on Mac 13.4, in python 3.6 and python 3.10 - and it didn't freeze. So that makes me think it is Windows 10 as you are running this and thats the one operating system I can't get hold of. So you have any other machines to run it on, to test if this is the issue, that is not running Win 10?

heiley8181 commented 2 months ago

Hi @sronilsson ,

I tried simba installation on a different computer with Windows Pro 11. Using the anaconda installation method, now I get an error message that says:

(simbaenv) C:\Users\User>simba
warning||SimBA could not find a FFMPEG installation on computer (as evaluated by "ffmpeg" returning None). SimBA works best with FFMPEG and it is recommended to install it on your computer

I downloaded the FFmpeg files, extracted and moved them to C:\Program Files, and added the Path (for the user variable). image

And I still get the warning for ffmpeg. If possible, please let me know what I could try next to solve this error message.

Thank you.

sronilsson commented 2 months ago

Hi @heiley8181! To confirm that ffmpeg is installed and accessable, open a terminal and type ffmpeg, what do you see?

sronilsson commented 2 months ago

just FYI This is how the path for ffmpeg looks like on my PC pointing to the FFmpeg bin folder:

Screenshot 2024-04-26 085656

heiley8181 commented 2 months ago

Hi @sronilsson ! So it seems like I did not type correct path for ffmpeg. I changed the path and now I can detect ffmpeg in the terminal.

(simbaenv) C:\Users\User>ffmpeg
ffmpeg version 2024-04-25-git-cae0f2bc55-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      59. 16.100 / 59. 16.100
  libavcodec     61.  5.103 / 61.  5.103
  libavformat    61.  3.100 / 61.  3.100
  libavdevice    61.  2.100 / 61.  2.100
  libavfilter    10.  2.101 / 10.  2.101
  libswscale      8.  2.100 /  8.  2.100
  libswresample   5.  2.100 /  5.  2.100
  libpostproc    58.  2.100 / 58.  2.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

However, as I type simba and launch the GUI, I still see the frozen GUI with no error messages. Do you have any suggestion for this?

Thank you in advance!

sronilsson commented 2 months ago

Thanks @heiley8181 - this is a tricky one..

When you boot up simba by typing simba do you see the splash screen below pop open before the main GUI?

image

if you type pip show simba-uw-tf-dev in your simba-test conda environment, it should print out where simba is installed:

image

If you go to that path on your computer and open simba/SimBA.py in a text editor, and comment out lines 1956-1957, does it run?

image

That seems to be the point where it freezes, when SimBA tries to print the welcome messages that I can't see in your screenshoots. Maybe those messages are causing the errors..

heiley8181 commented 2 months ago

Hi @sronilsson ,

When you boot up simba by typing simba do you see the splash screen below pop open before the main GUI?

Yes, I see the splash screen first and then the blank GUI.

I commented out the part you mentioned, and now I finally see unfrozen GUI! image

Thank you so much for all the help :)

sronilsson commented 2 months ago

Cool! I'm slightly worried that there will be more issues downstream though.. as other things are printed in the terminal and it would freeze up when those things print, let me know if that happens and we could try commenting out some other lines.

heiley8181 commented 1 month ago

Hello @sronilsson ,

I am trying to create the project for simba, and it seems like the GUI is frozen when I click create project config button. I do not see any error messages in the anaconda prompt as well. Do you think this could be solved by commenting out some other lines thay you mentioned?

Thanks in advance!

image

sronilsson commented 1 month ago

Hi @heiley8181 - thanks for reporting.

Possibly yes - one question just: has it previously worked to create a project - or has it never worked on your end?

I'm thinking it has to do with the printing and interpreting of emojis on your system. What I could probably do, if it has never worked, is to insert a single variable that prevents the printing of emojis so you only have to change a single line in the SimBA code.

heiley8181 commented 1 month ago

Thank you for the response. I have never been able to create a new project so far.

sronilsson commented 1 month ago

Cheers, let me make emojis configurable and get back to you and lets see if that fixes it.

sronilsson commented 1 month ago

Lets try this to start:

i) Update simba using pip install simba-uw-tf-dev —upgrade

ii) Go to where simba is installed as above and open simba/SimBA.py in a text editor.

iii) Go to approximately line 163 where you see PRINT_EMOJIS = True change this to PRINT_EMOJIS = False. Save and close the SimBA.py file. Note: This is the only thing you should have to do, you should no have to comment out the welcome message as you did previously.

Pasted Graphic

iv) Try and restart SimBA using simba and let me know how goes.

heiley8181 commented 1 month ago

Hi @sronilsson ,

I actually could not find the PRINT_EMOJIS = TRUE line at all. It seems like the emojis are called with get_emojis in my SimBA.py file. I am uploading the SimBA.py file I have on my computer. SimBA.zip

sronilsson commented 1 month ago

Thanks @heiley8181 - I will check first thing tomorrow, but meanwhile just to make sure - what version number do you see if you type pip show simba-uw-tf-dev ?

heiley8181 commented 1 month ago

Thanks for all the help. I have 1.90.4 version right now

sronilsson commented 1 month ago

Ah, I think latest version is in the 1.94 numbers - try the upgrade command again and see if that fixes it.

If not, I will double check tomorrow and get back to you, it's past my bedtime :)

heiley8181 commented 1 month ago

Hi @sronilsson , I updated to 1.94.4 version and changed the print_emojis to FALSE and now it works! I see messages in the simba GUI as well. Thanks for all the help :)

sronilsson commented 1 month ago

Cool @heiley8181! Just let me know if anything else comes up, should it freeze in some unexpected part again, and we'll fix.