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

Fix empty pickle file by adding missing optional log_config argument #75

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

brussee
Copy link

@brussee brussee commented Oct 9, 2024

Added the optional log_config argument to Builder. This fixes the otherwise empty pickle file produced by BaseNetQASMConnection on L409.

Also thanks to Ravi for helping to track this bug down.

FYI:
Removing L192 & L193 from BaseNetQASMConnection, because they are also present in Builder L248 & L249, results in the following error while running the tests:

--- Logging error ---
Traceback (most recent call last):
  File "/home/paul/.pyenv/versions/3.10.15/lib/python3.10/logging/__init__.py", line 1103, in emit
    stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
  File "/home/paul/.pyenv/versions/3.10.15/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/home/paul/.pyenv/versions/3.10.15/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/home/paul/.pyenv/versions/3.10.15/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
^CException ignored in: <module 'threading' from '/home/paul/.pyenv/versions/3.10.15/lib/python3.10/threading.py'>
Traceback (most recent call last):
  File "/home/paul/github/qutech-delft/netqasm/.venv3.10/squidasm/squidasm/run/multithread/runtime_mgr.py", line 125, in backend_thread
    ns.sim_run()
  File "/home/paul/.pyenv/versions/3.10.15/lib/python3.10/threading.py", line 1567, in _shutdown
  File "/home/paul/github/qutech-delft/netqasm/.venv3.10/lib/python3.10/site-packages/netsquid/util/simtools.py", line 278, in sim_run
    _simengine.run()
    lock.acquire()
  File "src/cysignals/signals.pyx", line 341, in cysignals.signals.python_check_interrupt
  File "/home/paul/github/qutech-delft/netqasm/.venv3.10/squidasm/squidasm/nqasm/qnodeos.py", line 147, in run
    ev = self._get_next_task_event()
  File "/home/paul/github/qutech-delft/netqasm/.venv3.10/squidasm/squidasm/nqasm/qnodeos.py", line 185, in _get_next_task_event
    self._logger.debug("No more subroutine tasks")
Message: 'No more subroutine tasks'
Arguments: ()

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

Successfully merging this pull request may close these issues.

1 participant