Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

TypeError: sequence item 0: expected str instance, NoneType found #15

Open
dpriskorn opened this issue Aug 5, 2020 · 1 comment
Open

Comments

@dpriskorn
Copy link

dpriskorn commented Aug 5, 2020

I tried transpiling a python script today and ran into this:
Traceback (most recent call last):
File "./pyrs.py", line 20, in
rs = transpile(source)
File "/home/egil/src/rust/python2rust/pyrs/transpiler.py", line 34, in transpile
return transpiler.visit(tree)
File "/home/egil/src/rust/python2rust/pyrs/clike.py", line 74, in visit
return super(CLikeTranspiler, self).visit(node)
File "/usr/lib/python3.8/ast.py", line 363, in visit
return visitor(node)
File "/home/egil/src/rust/python2rust/pyrs/transpiler.py", line 280, in visit_Module
buf += [self.visit(b) for b in node.body]
File "/home/egil/src/rust/python2rust/pyrs/transpiler.py", line 280, in
buf += [self.visit(b) for b in node.body]
File "/home/egil/src/rust/python2rust/pyrs/clike.py", line 74, in visit
return super(CLikeTranspiler, self).visit(node)
File "/usr/lib/python3.8/ast.py", line 363, in visit
return visitor(node)
File "/home/egil/src/rust/python2rust/pyrs/transpiler.py", line 193, in visit_Expr
s = self.visit(node.value)
File "/home/egil/src/rust/python2rust/pyrs/clike.py", line 74, in visit
return super(CLikeTranspiler, self).visit(node)
File "/usr/lib/python3.8/ast.py", line 363, in visit
return visitor(node)
File "/home/egil/src/rust/python2rust/pyrs/transpiler.py", line 133, in visit_Call
args = ", ".join(args)
TypeError: sequence item 0: expected str instance, NoneType found
source: https://gitlab.com/-/snippets/2001904

@konchunas
Copy link
Owner

konchunas commented Aug 6, 2020

I found that commenting out # print(f"Calculated net cost: {cost}kr") helps.
I'll try to fix that a bit later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants