Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError exception when running simulation #255

Open
cjmeyer opened this issue Apr 22, 2024 · 0 comments
Open

TypeError exception when running simulation #255

cjmeyer opened this issue Apr 22, 2024 · 0 comments

Comments

@cjmeyer
Copy link

cjmeyer commented Apr 22, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant