Issue388

Title assertion error with moviepy
Priority bug Status chatting
Superseder Nosy List SethTurin
Assigned To Keywords

Created on 2017-11-18.03:26:49 by SethTurin, last changed by SethTurin.

Messages
msg2294 (view) Author: SethTurin Date: 2017-11-18.08:40:11
I managed to track down the line that was causing issues. it's at line 134 in 
C:\Python27\Lib\site-packages\moviepy\decorators.py

The line reads:
    new_kw = {k: fun(v) if k=='fps' else v
             for (k,v) in k.items()}
             
I rewrote the line to read:
    new_kw = {}
    for (k,v) in k.items():
        new_kw[k] = fun(v) if k=='fps' else v

I'm kind of new at python, so hopefully I did that right. The change made 
nuitka work correctly with moviepy. While my workaround fixed it, this is 
still a bug in nuitka, because the original line is valid python syntax.

On a lighter note, now that I can actually see nuitka work, it's freakin 
awesome. Great work, guys.
msg2292 (view) Author: SethTurin Date: 2017-11-18.03:26:49
The error happens with a single python file with the following:

from moviepy.editor import *

The command line used is:
nuitka cutsilence.py --recurse-all

console output is:
('Problem with', <Node 'EXPRESSION_FUNCTION_BODY' with {'doc': ' Will use 
clip.f
ps if no fps=... is provided in **k ', 'provider': 'moviepy$decorators', 
'name':
 'use_clip_fps_by_default', 'parameters': <ParameterSpec 'f,clip,*a,**
<Parameter
Variable 'k' of 'use_clip_fps_by_default'>'>, 'ref_name': 
'moviepy$decorators$$$
function_10_use_clip_fps_by_default'}>)
('Problem with', <Node 'COMPILED_PYTHON_MODULE' with {'package': 'moviepy', 
'nam
e': 'decorators', 'filename': 'C:\\Python27\\Lib\\site-
packages\\moviepy\\decora
tors.py'}>)
Traceback (most recent call last):
  File "C:\Python27\Scripts\nuitka", line 211, in <module>
    MainControl.main()
  File "C:\Python27\Lib\site-packages\nuitka\MainControl.py", line 758, in 
main
    filename = filename
  File "C:\Python27\Lib\site-packages\nuitka\MainControl.py", line 118, in 
creat
eNodeTree
    Optimization.optimize()
  File "C:\Python27\Lib\site-packages\nuitka\optimizations\Optimization.py", 
lin
e 468, in optimize
    finished = makeOptimizationPass(False)
  File "C:\Python27\Lib\site-packages\nuitka\optimizations\Optimization.py", 
lin
e 401, in makeOptimizationPass
    if optimizeVariables(current_module):
  File "C:\Python27\Lib\site-packages\nuitka\optimizations\Optimization.py", 
lin
e 299, in optimizeVariables
    if optimizeUnusedUserVariables(function_body):
  File "C:\Python27\Lib\site-packages\nuitka\optimizations\Optimization.py", 
lin
e 262, in optimizeUnusedUserVariables
    function_body.removeUserVariable(local_variable)
  File "C:\Python27\Lib\site-packages\nuitka\nodes\FunctionNodes.py", line 
249,
in removeUserVariable
    assert variable in self.providing.values(), (self.providing, variable)
AssertionError: (OrderedDict([('f', <ParameterVariable 'f' of 
'use_clip_fps_by_d
efault'>), ('clip', <ParameterVariable 'clip' of 'use_clip_fps_by_default'>), 
('
a', <ParameterVariable 'a' of 'use_clip_fps_by_default'>), ('k', 
<ParameterVaria
ble 'k' of 'use_clip_fps_by_default'>), ('fun', <LocalVariable 'fun' of 
'use_cli
p_fps_by_default'>), ('func_code', <LocalVariable 'func_code' of 
'use_clip_fps_b
y_default'>), ('names', <LocalVariable 'names' of 'use_clip_fps_by_default'>), 
(
'arg', <LocalVariable 'arg' of 'use_clip_fps_by_default'>), ('name', 
<LocalVaria
ble 'name' of 'use_clip_fps_by_default'>), ('new_a', <LocalVariable 'new_a' of 
'
use_clip_fps_by_default'>), ('new_kw', <LocalVariable 'new_kw' of 
'use_clip_fps_
by_default'>)]), <LocalVariable 'k' of 'dictcontraction'>)
History
Date User Action Args
2017-11-18 08:40:11SethTurinsetmessages: + msg2294
2017-11-18 08:39:37SethTurinsetmessages: - msg2293
2017-11-18 08:38:31SethTurinsetpriority: critical -> bug
status: unread -> chatting
messages: + msg2293
2017-11-18 03:26:49SethTurincreate