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

[casa_distro virtualisation] unit tests are failing in the Singularity container #285

Open
servoz opened this issue Sep 6, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@servoz
Copy link
Contributor

servoz commented Sep 6, 2022

Exactly, the test.TestMIAMainWindow.test_open_shell test, and only on the BV Singularity container (not for host installation).

Exceptions / messages:

test_open_shell (__main__.TestMIAMainWindow)
Opens a Qt console and kill it afterwards. ... startShell
run_ipconsole_kernel: qtconsole
<frozen importlib._bootstrap>:914: ImportWarning: QtImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:914: ImportWarning: QtImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:914: ImportWarning: QtImporter.find_spec() not found; falling back to find_module()
runing IP console kernel
/usr/local/lib/python3.10/dist-packages/ipykernel/kernelapp.py:465: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
  zmq_ioloop.install()
/usr/local/lib/python3.10/dist-packages/ipykernel/kernelapp.py:305: DeprecationWarning: IPython.utils.io.raw_print has been deprecated since IPython 7.0
  io.raw_print(_ctrl_c_message)
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


/usr/local/lib/python3.10/dist-packages/ipykernel/kernelapp.py:307: DeprecationWarning: IPython.utils.io.raw_print has been deprecated since IPython 7.0
  io.raw_print(line)
To connect another client to this kernel, use:
    --existing kernel-29556.json

@servoz
Copy link
Contributor Author

servoz commented Sep 6, 2022

Without having really had time to look into the details, here is what is observed for "jupyter qtconsole" in mia (File > Open python shell):

  • Mia in host:
    • it doesn't really work: the window is open, but we can't access it:

Screenshot from 2022-09-06 18-02-43
- stdout:

startShell
run_ipconsole_kernel: qtconsole
runing IP console kernel
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing kernel-62384.json

But, no problem with UTs.

  • Mia in BV Singularity container:
    • it is working fine:

Screenshot from 2022-09-06 18-11-45
- stdout:

startShell
run_ipconsole_kernel: qtconsole
runing IP console kernel
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing kernel-63300.json
QCoreApplication::exec: The event loop is already running

But in this case, the UTs fail, or more precisely stop (nothing happens anymore) in the test.TestMIAMainWindow.test_open_shell with:

test_open_shell (__main__.TestMIAMainWindow)
Opens a Qt console and kill it afterwards. ... startShell
run_ipconsole_kernel: qtconsole
<frozen importlib._bootstrap>:914: ImportWarning: QtImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:914: ImportWarning: QtImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:914: ImportWarning: QtImporter.find_spec() not found; falling back to find_module()
runing IP console kernel
/usr/local/lib/python3.10/dist-packages/ipykernel/kernelapp.py:465: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
  zmq_ioloop.install()
/usr/local/lib/python3.10/dist-packages/ipykernel/kernelapp.py:305: DeprecationWarning: IPython.utils.io.raw_print has been deprecated since IPython 7.0
  io.raw_print(_ctrl_c_message)
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


/usr/local/lib/python3.10/dist-packages/ipykernel/kernelapp.py:307: DeprecationWarning: IPython.utils.io.raw_print has been deprecated since IPython 7.0
  io.raw_print(line)
To connect another client to this kernel, use:
    --existing kernel-63432.json

@denisri
Copy link
Contributor

denisri commented Sep 7, 2022

Unfortunately the ipyhton/jupyter console integration in a running python kernel is very very unstable. It is an undocumented feature that used to work, but is not explicitly maintained. In recent systems it is mostly broken, and I could make it work only in a very precise combination of versions of jupyter, ipython, qtconsole, tornado and a bunch of other modules. A nightmare. So I suppose this feature will have to disappear sooner or later, but it is very very useful for debugging or experimenting things, so as long as I can make it work, I like to have it. But, unfortunately also, I could not make a test to know if it works or not: when it does not, things just hang. It's really a pity that this is not an officially maintained feature, because it's really helpful.

@servoz
Copy link
Contributor Author

servoz commented Sep 7, 2022

Thank you for your answer @denisri.
I have to admit that I don't know this (and I never use Jupyter, I'm a bit ashamed :-))).
@patafana should take a look at it if he has time (I don't have time to do it at the moment).
From what you say, maybe he doesn't need to look at it?
What bothers me a bit is that at the moment the unit tests are working for a wrong reason.
On the host, it doesn't work and consequently the unit tests work correctly. In casa_distro, it works and as a result the tests crash (it stays stuck at test.TestMIAMainWindow.test_open_shell) ...

@servoz servoz added the enhancement New feature or request label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants