fourMs / MGT-python

Musical Gestures Toolbox for Python
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/musicalgesturestoolbox/mgt-python/index.html
GNU General Public License v3.0
53 stars 11 forks source link

Infinite loop when running mg.show() in jupyter notebook #218

Closed alenaclim closed 3 years ago

alenaclim commented 3 years ago

I've installed the musicalgestures from scratch on a laptop which didn't have any python related programs before.

I've started to run the cells of the notebook, and when I got to run the mg.show() cell (before preprocessing) a new window poped up with the video. However, if I pressed on close, it would briefly appear to close but then popped up open again. I interrupted the kernel but the popped up video is still there. I had to restart the kernel and not run that cell.

Contrary to what I believed at first, this didn't happen infinitely, but rather until the duration of the video ran out. But there should be a way to close it even before the video plays, right? I had an idea that maybe clear_output(wait = True) might have worked but it didn't. I'm stuck but I'm looking into it as well.

balintlaczko commented 3 years ago

Hey Alena! I don't have this issue with the new version (here is a test release, but there are actually more changes/features coming soon). But if I remember correctly, this was an issue with the old cv2-based playback window, where you had to press "Q" to quit specifically, otherwise it would run until the video is over (even ignoring the X button at the corner of the window). Try to install the new test version, it now uses FFplay for this task which is much more flexible and efficient.

alenaclim commented 3 years ago

Hi Balint!

Oh I didn't know, so sorry to open an useless issue :( I also didn't think to press "Q" to quit, that's a good thing to know. The way I installed it was to download the zip of the repository, and that was the version I used. I didn't install it with pip. I will install the new version, but maybe it's worth double checking what happens if people only download or clone the repository. Thanks for letting me know about the issue!

During the seminar we didn't have a lot of time to go through the notebook, so I don't have other issues from the other participants. Besides the ffmpeg that I had to help someone add as a path as well. I'll keep you updated if anything comes up. Should I then stop going through the old version and only focus on the new one?

Alena

On Tue, Apr 27, 2021 at 2:07 PM Balint Laczko @.***> wrote:

Hey Alena! I don't have this issue with the new version (here is a test release https://test.pypi.org/project/musicalgestures/1.0.99/, but there are actually more changes/features coming soon). But if I remember correctly, this was an issue with the old cv2-based playback window, where you had to press "Q" to quit specifically, otherwise it would run until the video is over (even ignoring the X button at the corner of the window). Try to install the new test version, it now uses FFplay for this task which is much more flexible and efficient.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/fourMs/MGT-python/issues/218#issuecomment-827554920, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4GFE6HMOJKQINR33XBWYDTK2SILANCNFSM43GWFC4Q .

balintlaczko commented 3 years ago

Yes, absolutely! The best would be if you would use the test release until a new test- or real one comes out - but, if you are okay with possible changes (or bugs) time to time, you can use this dev branch as well. The last github release is still the old 1.0 version, that you can simply install as pip install musicalgestures. That will soon be replaced with the upcoming stable release.