[notebook-0 workspace]$ gpustat
Traceback (most recent call last):
File "/home/sandbox/.local/bin/gpustat", line 5, in <module>
from gpustat import main
File "/home/sandbox/.local/lib/python3.7/site-packages/gpustat/__init__.py", line 7, in <module>
from .core import GPUStat, GPUStatCollection
File "/home/sandbox/.local/lib/python3.7/site-packages/gpustat/core.py", line 31, in <module>
class GPUStat(object):
File "/home/sandbox/.local/lib/python3.7/site-packages/gpustat/core.py", line 161, in GPUStat
term=Terminal(),
File "/home/sandbox/.local/lib/python3.7/site-packages/blessings/__init__.py", line 98, in __init__
self._init_descriptor)
_curses.error: setupterm: could not find terminfo database
When I run gpustat in my terminal, I get the above output.
Related
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "<string>", line 2, in <module>
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/pywhatkit/__init__.py", line 16, in <module>
from pywhatkit.whats import (
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/pywhatkit/whats.py", line 7, in <module>
import pyautogui as pg
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/pyautogui/__init__.py", line 249, in <module>
import mouseinfo
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/mouseinfo/__init__.py", line 223, in <module>
_display = Display(os.environ['DISPLAY'])
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/os.py", line 679, in __getitem__ raise KeyError(key) from None
KeyError: 'DISPLAY'
[Program finished]
import pywhatkit
pywhatkit.sendwhatmsg ("+9195352xxxx5", "Hello ", 14, 10)
pywhatkit not getting imported in this 2 line program. Above is the error message.
I run the python code from the root. Shows an error when I just imported the module:
ERROR : Traceback (most recent call last):
File "/home/amir/photo.py", line 4, in <module>
import pyautogui as gui
File "/usr/local/lib/python3.9/dist-packages/pyautogui/__init__.py", line 249, in <module>
import mouseinfo
File "/usr/local/lib/python3.9/dist-packages/mouseinfo/__init__.py", line 223, in <module>
_display = Display(os.environ['DISPLAY'])
File "/usr/local/lib/python3.9/dist-packages/Xlib/display.py", line 80, in __init__
self.display = _BaseDisplay(display)
File "/usr/local/lib/python3.9/dist-packages/Xlib/display.py", line 62, in __init__
display.Display.__init__(*(self, ) + args, **keys)
File "/usr/local/lib/python3.9/dist-packages/Xlib/protocol/display.py", line 129, in __init__
raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":1": b'No protocol specified\n'
In command line python -c 'import flask'
Output:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/ubuntu/.local/lib/python2.7/site-packages/flask/__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "/home/ubuntu/.local/lib/python2.7/site-packages/werkzeug/__init__.py", line 151, in <module>
__import__('werkzeug.exceptions')
File "/home/ubuntu/.local/lib/python2.7/site-packages/werkzeug/exceptions.py", line 67, in <module>
from werkzeug._internal import _get_environ
File "/home/ubuntu/.local/lib/python2.7/site-packages/werkzeug/_internal.py", line 13, in <module>
import inspect
File "/usr/lib/python2.7/inspect.py", line 39, in <module>
import tokenize
File "/usr/lib/python2.7/tokenize.py", line 39, in <module>
COMMENT = N_TOKENS
NameError: name 'N_TOKENS' is not defined
How can I solve it?
Met this error in my flask project, although yesterday everything was fine.
I'm trying to install EC2_API on openstack ( newton )
I've got this problem ?
now the cloud is down : the problem is in every log
Please enter the password for the 'root' MySQL user:
Verified connectivity to MySQL.
Creating 'ec2api' database.
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 13, in <module>
from pip.exceptions import InstallationError, CommandError, PipError
File "/usr/lib/python2.7/dist-packages/pip/exceptions.py", line 6, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
vendored("cachecontrol")
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 3, in <module>
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/__init__.py", line 53, in <module>
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 54, in <module>
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 112, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
As the title says I am using Sphinx to generate documentation for a python library and using the auto doc functions.
The problem I am having is that the autodoc importer does not properly import the libraries.
Traceback (most recent call last):rs/user
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/decorators.py", line 4, in <module>
import response
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/response.py", line 2, in <module>
from lib.helpers import gtJSONEncoder
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/helpers.py", line 3, in <module>
from gt import Model, EMAIL_FROM, EMAIL_HOST
File "/Users/prggmr/Work/chevy/gt/software/gt/gt.py", line 114, in <module>
from modules.user import views
File "/Users/prggmr/Work/chevy/gt/software/gt/modules/user/views.py", line 5, in <module>
from lib import response
ImportError: cannot import name response
Traceback (most recent call last):json
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/helpers.py", line 2, in <module>
import response
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/response.py", line 2, in <module>
from lib.helpers import gtJSONEncoder
ImportError: cannot import name gtJSONEncoder
Traceback (most recent call last):messages
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
ImportError: No module named helper
Traceback (most recent call last):request
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/helpers.py", line 2, in <module>
import response
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/response.py", line 2, in <module>
from lib.helpers import gtJSONEncoder
ImportError: cannot import name gtJSONEncoder
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/helpers.py", line 2, in <module>
import response
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/response.py", line 2, in <module>
from lib.helpers import gtJSONEncoder
ImportError: cannot import name gtJSONEncoder
Traceback (most recent call last):ser
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
File "/Users/prggmr/Work/chevy/gt/software/gt/modules/user/models.py", line 6, in <module>
import gt
File "/Users/prggmr/Work/chevy/gt/software/gt/gt.py", line 114, in <module>
from modules.user import views
File "/Users/prggmr/Work/chevy/gt/software/gt/modules/user/views.py", line 7, in <module>
from lib.decorators import valid_user
File "/Users/prggmr/Work/chevy/gt/software/gt/lib/decorators.py", line 7, in <module>
from gt.modules.user.models import get_user_account, is_login_valid
ImportError: No module named modules.user.models
Traceback (most recent call last):ser
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
File "/Users/prggmr/Work/chevy/gt/software/gt/modules/user/views.py", line 2, in <module>
from gt import app, TEMPLATES_PATH
File "/Users/prggmr/Work/chevy/gt/software/gt/gt.py", line 114, in <module>
from modules.user import views
ImportError: cannot import name views
I have tripled checked that the paths are correct and I am including them on the system path.
The thing that really gets me about this is that I can run the application just perfectly and all unit tests are passing with over 95% code coverage ... yet sphinx cannot import it.
That looks like an import loop. Try to organize your imports so that they don't depend on each other in a circle.
Alternatively, you can try to reorder them. Perhaps in helpers.py move line 3 to the bottom of the file, or something similar.