#591 - still problem with (in _callfunc) #44

pyjsorg opened this Issue Apr 27, 2012 · 0 comments

1 participant


I'm not sure if I'm able to reopen #591 - seems I'm not.

However, I got the same (similar) error today, with most recent pyjamas sources.

Code is:

_dto = (self.date_to.getDate()+timedelta(days=32)).replace(day=1)

And got such traceback:

maho@dlaptop:~/[...]py$ bash build.sh

  • '[' -n '' ']'
  • '[' 0 = 1 ']'
  • /home/maho/pyjamas/bin/pyjsbuild --no-compile-inplace -o ../../pyjs all Building : all PYJSPATH : [ /home/maho/[...]py /home/maho/pyjamas/library /home/maho/pyjamas/addons ] Translating : [...]lib/py/all.py Traceback (most recent call last): File "/home/maho/pyjamas/bin/pyjsbuild", line 21, in <module> pyjs.browser.build_script() File "/home/maho/pyjamas/pyjs/src/pyjs/browser.py", line 555, in build_script runtime_options, args) File "/home/maho/pyjamas/pyjs/src/pyjs/browser.py", line 408, in build l() File "/home/maho/pyjamas/pyjs/src/pyjs/linker.py", line 254, in call self.visit_modules(self.modules, platform) File "/home/maho/pyjamas/pyjs/src/pyjs/linker.py", line 306, in visit_modules self.visit_module(p, override_paths, platform, module_name=mn) File "/home/maho/pyjamas/pyjs/src/pyjs/linker.py", line 359, in visit_module self.keep_lib_files) File "/home/maho/pyjamas/pyjs/src/pyjs/linker.py", line 145, in out_translate raise translator.TranslationError(stderr_value, None) pyjs.translator_proto.TranslationError: line Unknown: Traceback (most recent call last): File "translator.py", line 73, in <module> main() File "translator.py", line 60, in main *get_compile_options(options)) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 4349, in translate module_name, sources[0], src, tree, output, *kw) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 859, in init self._class(child) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 2779, in _class self._stmt(child, current_klass) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 3053, in _stmt self._function(node, current_klass) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 2124, in _function return self._method(node, current_klass) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 2939, in _method self._stmt(child, current_klass) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 3035, in _stmt self._assign(node, current_klass) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 3290, in _assign rhs = self.expr(node.expr, current_klass) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 4207, in expr return self._callfunc(node, current_klass, optlocal_var=True) File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 2454, in _callfunc optlocal_var=optlocal_var, File "/home/maho/pyjamas/pyjs/src/pyjs/translator_proto.py", line 2388, in _callfunc_code "unsupported type (in _callfunc)", v.node.expr, self.module_name) translator_proto.TranslationError: all line 85: unsupported type (in _callfunc) Add((CallFunc(Getattr(Getattr(Name('self'), 'date_to'), 'getDate'), [], None, None), CallFunc(Name('timedelta'), [Keyword('days', Const(32))], None, None)))



Original issue: http://code.google.com/p/pyjamas/issues/detail?id=679 (January 28, 2012 18:33:27)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment