You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
When trying to raise site-packages/openai/__init__.py the following crash happens
Error while running ast tool ir, check args: ModulePath should have a name spec. Impossible.
Traceback (most recent call last):
File "/home/mgtm98/miniconda3/bin/jac", line 8, in <module>
sys.exit(start_cli())
^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/cli/cli.py", line 438, in start_cli
ret = command.call(**args_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/cli/cmdreg.py", line 25, in call
return self.func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/cli/cli.py", line 273, in tool
raise e
File "/home/mgtm98/jaclang/jaclang/cli/cli.py", line 268, in tool
print(getattr(AstTool(), tool)(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/utils/lang_tools.py", line 237, in ir
ir = jac_file_to_pass(
^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/compile.py", line 33, in jac_file_to_pass
return jac_str_to_pass(
^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/compile.py", line 55, in jac_str_to_pass
ast_ret = i(input_ir=ast_ret.ir, prior=ast_ret)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/passes/ir_pass.py", line 23, in __init__
Transform.__init__(self, input_ir, prior)
File "/home/mgtm98/jaclang/jaclang/compiler/passes/transform.py", line 47, in __init__
self.ir = self.transform(ir=input_ir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/passes/ir_pass.py", line 115, in transform
self.after_pass()
File "/home/mgtm98/jaclang/jaclang/compiler/passes/main/import_pass.py", line 304, in after_pass
PyastBuildPass(
File "/home/mgtm98/jaclang/jaclang/compiler/passes/main/pyast_load_pass.py", line 25, in __init__
Pass.__init__(self, input_ir=input_ir, prior=None)
File "/home/mgtm98/jaclang/jaclang/compiler/passes/ir_pass.py", line 23, in __init__
Transform.__init__(self, input_ir, prior)
File "/home/mgtm98/jaclang/jaclang/compiler/passes/transform.py", line 47, in __init__
self.ir = self.transform(ir=input_ir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/passes/main/pyast_load_pass.py", line 56, in transform
self.ir: ast.Module = self.proc_module(ir.ast)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/passes/main/pyast_load_pass.py", line 106, in proc_module
elements: list[ast.AstNode] = [self.convert(i) for i in node.body]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/passes/main/pyast_load_pass.py", line 106, in <listcomp>
elements: list[ast.AstNode] = [self.convert(i) for i in node.body]
^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/passes/main/pyast_load_pass.py", line 44, in convert
ret = getattr(self, f"proc_{pascal_to_snake(type(node).__name__)}")(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/passes/main/pyast_load_pass.py", line 1510, in proc_import_from
path = ast.ModulePath(
^^^^^^^^^^^^^^^
File "/home/mgtm98/jaclang/jaclang/compiler/absyntree.py", line 921, in __init__
raise ValueError("ModulePath should have a name spec. Impossible.")
ValueError: ModulePath should have a name spec. Impossible.
Is this a regression?
The code used to work before as the code for raising a Python module was inside a try-except block but then I decided to remove it to expose all the issues with py raise. A possible fix for this is adding it inside a try-except block again but I don't prefer that.
Describe the bug
When trying to raise
site-packages/openai/__init__.py
the following crash happensIs this a regression?
The code used to work before as the code for raising a Python module was inside a try-except block but then I decided to remove it to expose all the issues with py raise. A possible fix for this is adding it inside a try-except block again but I don't prefer that.
Expected behaviour
All the python modules should be raised to jac without any issues
To Reproduce
The text was updated successfully, but these errors were encountered: