NGSolve / ngsgui

New graphical interface for NGSolve
11 stars 9 forks source link

TypeError: ChannelABC() takes no arguments #2

Closed ouening closed 4 years ago

ouening commented 4 years ago

ngsolve: NGSolve-6.2.2004-win64 python: 3.7.4 (in system) I installed ngsgui from source: python setup.py install Afetr that , I run python -m ngsgui then error happened:

importing NGSolve-6.2.2004
Traceback (most recent call last):
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\ngsgui\__main__.py", line 37, in <module>
    main()
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\ngsgui\__main__.py", line 33, in main
    G.gui = G.GUI()
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\ngsgui\gui.py", line 57, in __init__
    self._createLayout()
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\ngsgui\gui.py", line 160, in _createLayout
    self.console = NGSJupyterWidget(gui=self,multikernel_manager = self.multikernel_manager)
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\ngsgui\console.py", line 34, in __init__
    self.kernel_client = self.kernel_manager.client()
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\qtconsole\base_frontend_mixin.py", line 63, in kernel_client
    if kernel_client.channels_running:
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\jupyter_client\client.py", line 141, in channels_running
    self.control_channel.is_alive())
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\jupyter_client\client.py", line 200, in control_channel
    socket, self.session, self.ioloop
TypeError: ChannelABC() takes no arguments

Also I found another problem aboud ngsolve,I executed the command ngsolve after I have installed ngsolve and restart computer, an error occured:

λ netgen.exe
NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
loading ngsolve library
NGSolve-6.2.2004
Using Lapack
Including sparse direct solver Pardiso
Including sparse direct solver UMFPACK
Running parallel using 8 thread(s)
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00001dc0 (most recent call first):

Is that because I have another python in my computer? Hope for solution for it, thank you!

ChrLackner commented 4 years ago

Do you have the latest master installed? The first issue should be fixed with https://github.com/NGSolve/ngsgui/commit/20d81cc90f15ec3da03dcef4ad9b14f60fd67620 The second seems to be an issue with your python setup and similar to here: https://stackoverflow.com/questions/42512817/fatal-python-error-on-windows-10-modulenotfounderror-no-module-named-encodings

pls reopen if issue is not resolved.

Best Christopher

ouening commented 4 years ago

Thank you I have solved the second problem through adding system variable PYTHONHOME. But for the first problem, I was using the latest code and reinstalled again, got error:

Traceback (most recent call last):
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\ngsgui-0.1.11-py3.7.egg\ngsgui\__init__.py", line 18, in <module>
    from .scenes import *
  File "E:\Applications\WPy64-3741\python-3.7.4.amd64\lib\site-packages\ngsgui-0.1.11-py3.7.egg\ngsgui\scenes.py", line 2, in <module>
    import numpy, os, ngsolve
ModuleNotFoundError: No module named 'ngsolve'

It's really strange

ChrLackner commented 4 years ago

where did you install ngsolve to? Your pythonhome does need to include that path as well.