[Tutor] TypeError: argument of type 'NoneType' is not iterable
Aditya Karthik
adityakarthik9 at gmail.com
Wed Jul 14 09:11:59 EDT 2021
I want to run the contents of a folder named rvnewop for my dump file
file.dump
So i type this command in the terminal:
python3 -m rvnewop path/to/file.dump
But then I get an error :
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File
"/home/aditya/.local/lib/python3.8/site-packages/riscv-newop/rvnewop/__main__.py",
line 3, in <module>
main()
File
"/home/aditya/.local/lib/python3.8/site-packages/riscv-newop/rvnewop/main.py",
line 22, in main
program = Histogram.parse(args.filename, args.isa)
File
"/home/aditya/.local/lib/python3.8/site-packages/riscv-newop/rvnewop/Histogram.py",
line 10, in parse
program = Program(name=filename, isa=isa)
File
"/home/aditya/.local/lib/python3.8/site-packages/riscv-newop/rvnewop/Program.py",
line 13, in __init__
self.rv = RV32(isa=isa)
File
"/home/aditya/.local/lib/python3.8/site-packages/riscv-newop/rvnewop/RV32.py",
line 34, in __init__
if "32I" in isa:
TypeError: argument of type 'NoneType' is not iterable
The rvnewop file that i want to use is predefined and has been developed by
a developer and it should work fine for my dump file.
I don't think there should be any problems with the code as it is
predefined and proven to work fine.
I think I am committing an error somewhere while calling the
files/directories in the command line
when i try to execute using my command, i point to the path:
./.local/lib/python3.8/site-packages/riscv-newop
whereas the files i am trying to access are from the
path:/.local/lib/python3.8/site-packages/riscv-newop/rvnewop
But, i don't think you are supposed to cd into the package directory or
include it in the python's search path in another way.
Not sure if that is the error I am committing.
Please Help!
For the codes, kindly refer to the link,
https://github.com/riscv-newop/riscv-newop/tree/master/rvnewop
Is it possible to run only a particular .py file for example main.py from
the rvnewop folder instead of running the entire folder ?
I am kinda lost here due of these issues.
Can anyone please help me ?
More information about the Tutor
mailing list