TinyPy throws (_tp_dict_get) KeyError for exit()

Started by eumagga0x2a, April 02, 2017, 12:11:54 AM

Previous topic - Next topic

eumagga0x2a

STR:

  • Load a video
  • Run dvd.py from autoScripts
  • Press the ESC key

Actual Results:
TinyPy engine throws

(_tp_dict_get) KeyError: exit

exception. Just evaluating exit() or quit() in the script console results in the same outcome.

I never touched Avidemux scripting (and Python :-[) before and wonder if this is a regression, a limitation of the script engine or something else. The current behaviour is not nice.

Jan Gruuthuse

Key [Esc]
Pop-up window:
QuoteTinyPy:Exception
Exception :(_tp_dict_get) KeyError: exit
Backtrack:
File:py2bc.py, line 53
File:/ust/lib/ADM_plugins6/autoscripts/dvd.py, line 56

Executing /usr/lib/ADM_plugins6/autoScripts/dvd.py with Tinypy engine
[Script] Tinypy INFO - Executing /usr/lib/ADM_plugins6/autoScripts/dvd.py...
[Script] Tinypy INFO - Trying /home/jan/ADM_imageInfo
[Script] Tinypy INFO -

[Script] Tinypy INFO - Trying /usr/lib/ADM_plugins6/autoScripts//lib/ADM_imageInfo
[Script] Tinypy INFO -

[Script] Tinypy INFO - Trying /home/jan/ADM_image
[Script] Tinypy INFO -

[Script] Tinypy INFO - Trying /usr/lib/ADM_plugins6/autoScripts//lib/ADM_image
[Script] Tinypy INFO -

[Script] Tinypy INFO - Fps    : 50000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Format : 1
[Script] Tinypy INFO -

[Script] Tinypy INFO - Format : 1
[Script] Tinypy INFO -

[Script] Tinypy INFO - Format : 1
[Script] Tinypy INFO -

[Script] Tinypy INFO -

[Script] Tinypy INFO - import_fname
[Script] Tinypy INFO -

[Script] Tinypy INFO -     exec(code,g)
[Script] Tinypy INFO -

[Script] Tinypy INFO - ?
[Script] Tinypy INFO -

[Script] Tinypy INFO -     exit()
[Script] Tinypy INFO -

[Script] Tinypy INFO -
Exception:

[Script] Tinypy INFO - (_tp_dict_get) KeyError: exit
[Script] Tinypy INFO -

[HandleAction] 05:05:53-720  ************ PlayAvi **************


pressing play: video plays

Jan Gruuthuse

Clicking [Cancel] does produces the same pop-up window.
Also with other script like 720p.

Jan Gruuthuse

#3
Could it be  on [Esc] or [Cancel]
- calling the pop-up window routine when it should not?
- intercepting, while it shouldn't?

eumagga0x2a

Discarding the dialog in any possible way calls exit() in the dvd.py tinyPy script, which throws the exception.

Jan Gruuthuse

#5
You don't get different exit values with a regular exit of TinyPy script, so you could catch a regular exit?
Perhaps this is of some use:
https://github.com/pyinstaller/pyinstaller/issues/1869