cocotb-test
cocotb-test copied to clipboard
`TypeError` exception when running simulation
When trying to run a simulation, a TypeError
exception is being thrown; error shown below. I was finally able to track down the error to libpython3.12.so
not being installed, but it would be nice if cocotb-test would be able to detect this case and provide a more informative error. I believe that cocotb-test could check if find_libpython.find_libpython()
returned None
or an empty string and raised an error at simulator.py:207 instead of setting LIBPYTHON_LOC
to an empty string value which results in the TypeError
getting thrown from subprocess.py
.
cocotb version - 1.8, stable cocotb-test version - 0.2.5 (installed w/ pip) operating system - Ubuntu, 20.06.6 LTS, 64-bit simulator version - GHDL, 4.0.0 python version - 3.12, in a virtual environment error -
/usr/lib/python3.12/asyncio/runners.py:194: in run
return runner.run(main)
/usr/lib/python3.12/asyncio/runners.py:118: in run
return self._loop.run_until_complete(task)
/usr/lib/python3.12/asyncio/base_events.py:685: in run_until_complete
return future.result()
.venv/lib/python3.12/site-packages/cocotb_test/simulator.py:310: in _exec
p = await asyncio.create_subprocess_exec(
/usr/lib/python3.12/asyncio/subprocess.py:224: in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
/usr/lib/python3.12/asyncio/base_events.py:1742: in subprocess_exec
transport = await self._make_subprocess_transport(
/usr/lib/python3.12/asyncio/unix_events.py:211: in _make_subprocess_transport
transp = _UnixSubprocessTransport(self, protocol, args, shell,
/usr/lib/python3.12/asyncio/base_subprocess.py:36: in __init__
self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
/usr/lib/python3.12/asyncio/unix_events.py:820: in _start
self._proc = subprocess.Popen(
/usr/lib/python3.12/subprocess.py:1026: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
/usr/lib/python3.12/subprocess.py:1870: in _execute_child
env_list.append(k + b'=' + os.fsencode(v))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
filename = None
> ???
E TypeError: expected str, bytes or os.PathLike object, not NoneType
<frozen os>:818: TypeError