Closed danyan90 closed 5 years ago
From your screenshot I see some exception related to a tango.gevent which is a PyTango (not taurus) module. I cannot see how you got that, since your screenshot does not sow the stack trace...
In order to be able to help you, can you please copy and paste the actual taurus code that you are running and also the whole console output? (please just copy-paste the text, not an screenshot)
Yes, of course Code of example:
import sys
from taurus.external.qt import Qt
from taurus.qt.qtgui.application import TaurusApplication
app = TaurusApplication(sys.argv, cmd_line_parser=None,)
panel = Qt.QWidget()
layout = Qt.QHBoxLayout()
panel.setLayout(layout)
from taurus.qt.qtgui.display import TaurusLabel
w = TaurusLabel()
layout.addWidget(w)
w.model = 'sys/taurustest/1/position'
panel.show()
sys.exit(app.exec_())
the result (sorry, I don't know why it's so long, but I think the key moment is at the end)
runfile('C:/Users/tango/PycharmProjects/1.py', wdir='C:/Users/tango/PycharmProjects')
MainThread INFO 2019-08-30 14:33:20,267 TaurusRootLogger: Using PyQt5 (v5.9.2 with Qt 5.9.7 and Python 3.7.3)
Traceback (most recent call last):
File "C:\tango\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-83743f79f16f>", line 1, in <module>
runfile('C:/Users/tango/PycharmProjects/1.py', wdir='C:/Users/tango/PycharmProjects')
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/tango/PycharmProjects/1.py", line 3, in <module>
from taurus.qt.qtgui.application import TaurusApplication
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\__init__.py", line 33, in <module>
from . import icon as __icon
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\icon\__init__.py", line 34, in <module>
from .catalog import QIconCatalog
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\icon\catalog.py", line 36, in <module>
from taurus.qt.qtgui.input import GraphicalChoiceWidget
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\input\__init__.py", line 32, in <module>
from .tauruscheckbox import *
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\input\tauruscheckbox.py", line 33, in <module>
from taurus.qt.qtgui.base import TaurusBaseWritableWidget
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\base\__init__.py", line 31, in <module>
from .taurusbase import *
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\base\taurusbase.py", line 55, in <module>
from taurus.qt.qtgui.util import ActionFactory
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\util\__init__.py", line 33, in <module>
from .tauruscolor import *
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\qt\qtgui\util\tauruscolor.py", line 95, in <module>
from taurus.core.tango import DevState
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\core\tango\__init__.py", line 108, in <module>
from .enums import *
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\taurus\core\tango\enums.py", line 43, in <module>
import PyTango
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\PyTango.py", line 51, in <module>
'constants': 'constants'},
File "C:\tango\Anaconda3\lib\site-packages\PyTango.py", line 25, in alias_package
__import__(name)
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\tango\Anaconda3\lib\site-packages\tango\gevent.py", line 42, in <module>
check_requirements()
File "C:\tango\Anaconda3\lib\site-packages\tango\gevent.py", line 35, in check_requirements
gevent_version = ".".join(map(str, gevent.version_info[:3]))
AttributeError: module 'gevent' has no attribute 'version_info'
I just found, the same issue appears when I invoke Taurus from cmd:
MainThread WARNING 2019-08-30 15:25:20,473 TaurusRootLogger: Cannot add "ql
ogmon" subcommand to taurus. Reason: AttributeError("module 'gevent' has no attr
ibute 'version_info'")
Hola @danyan90 ,
Seems a problem with your PyTango
dependency. How do you install taurus? and (Py)Tango?
just pip install, and after that i received a fully working system. But I made some doubtful changes at Anaconda environment, maybe that's the cause. Now i'm restoring good configuration with acronis, I hope it would help
Hello, I'm a beginner Tango developer, so for better understanding Taurus I had decided to try examples from here I had starter a proposed device server and ctrl-c ctrl-v first code example to pycharm
and this is what I got as a result