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

playbin.query_position fails #78

Closed
rffontenelle opened this issue Feb 7, 2018 · 4 comments
Closed

playbin.query_position fails #78

rffontenelle opened this issue Feb 7, 2018 · 4 comments

Comments

@rffontenelle
Copy link
Contributor

rffontenelle commented Feb 7, 2018

I was subtitling at the moment, with video open, and I'm not sure whether was writer in a entry or just pressed "j" to add a new entry, when a popup with the following message showed up.

Traceback

File: /usr/lib/python3.6/site-packages/gaupol/agents/edit.py
Line: 150
In: _on_insert_subtitle_at_video_position_activate

    index = bisect.bisect_right(starts, pos)

TypeError: '<' not supported between instances of 'NoneType' and 'float'

Environment

Platform: Linux-4.14.15-1-ARCH-x86_64-with-arch
Locale: pt_BR.utf_8

Versions

aeidon: 1.2
chardet: 3.0.4
enchant: 2.0.0
gaupol: 1.2
gstreamer: 1.12.4.0
gtk+: 3.22.26
pygobject: 3.26.1
python: 3.6.4

P.s.: The installed enchant version is actually 2.2.1

@rffontenelle
Copy link
Contributor Author

I initially thought it crashed, but it seems that it didn't and I'm still using it without having to close it.

@otsaloma
Copy link
Owner

otsaloma commented Feb 7, 2018

It seems that querying position from GStreamer fails (playbin.query_position). That's where the None comes from. There's another issue where the same thing failed in a different context: #67

So, this does look like a bug, but I can't tell under what conditions it happens, can't reproduce it and don't really know what do in such a case. Suggestions are welcome.

@otsaloma otsaloma changed the title Crash, with "'<' not supported between instances of 'NoneType' and 'float'" playbin.query_position fails Feb 7, 2018
@otsaloma otsaloma added the bug label Feb 7, 2018
@rffontenelle
Copy link
Contributor Author

Fair enough. I'll try to reproduce it somehow and let you know.

@otsaloma
Copy link
Owner

I suspect the problem is due to some kind of a temporary pipeline state or state change and if the query is not succesful, it's worth waiting a tiny amount and trying again. I added such a fix in the above commit. I also added some checks against the None value, so if the root problem persists, you shouldn't get an error anymore, but whatever ongoing action will silently fail. I keep this issue open for now, close it later if the problem has indeed been solved.

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

2 participants