对于Centos6.5下安装jumpserver-1.4.1报错AttributeError:module'gssapi'hasnoattribute'GSSException'感兴趣的读者,本文将会
对于Centos6.5下安装jumpserver-1.4.1报错AttributeError: module 'gssapi' has no attribute 'GSSException'感兴趣的读者,本文将会是一篇不错的选择,并为您提供关于Appium问题解决方案(2)- AttributeError:module 'appium.webdriver' has no attribute 'Remote'、AttributeError: ''module'' object has no attribute ''_create_unverified_context''、AttributeError: ''Settings'' object has no attribute ''HBase''、AttributeError: 'Settings' object has no attribute 'TEMPLATE_CONTEXT_PROCESSORS'的有用信息。
本文目录一览:- Centos6.5下安装jumpserver-1.4.1报错AttributeError: module 'gssapi' has no attribute 'GSSException'
- Appium问题解决方案(2)- AttributeError:module 'appium.webdriver' has no attribute 'Remote'
- AttributeError: ''module'' object has no attribute ''_create_unverified_context''
- AttributeError: ''Settings'' object has no attribute ''HBase''
- AttributeError: 'Settings' object has no attribute 'TEMPLATE_CONTEXT_PROCESSORS'
Centos6.5下安装jumpserver-1.4.1报错AttributeError: module 'gssapi' has no attribute 'GSSException'
报错:
>>> import paramiko Traceback (most recent call last): File "<stdin>",line 1,in <module> File "/Data/apps/ENV3/lib/python3.6/site-packages/paramiko/__init__.py",line 22,in <module> from paramiko.transport import SecurityOptions,Transport File "/Data/apps/ENV3/lib/python3.6/site-packages/paramiko/transport.py",line 38,in <module> from paramiko.auth_handler import AuthHandler File "/Data/apps/ENV3/lib/python3.6/site-packages/paramiko/auth_handler.py",line 72,in <module> from paramiko.ssh_gss import GSSAuth,GSS_EXCEPTIONS File "/Data/apps/ENV3/lib/python3.6/site-packages/paramiko/ssh_gss.py",line 55,in <module> GSS_EXCEPTIONS = (gssapi.GSSException,) AttributeError: module ‘gssapi‘ has no attribute ‘GSSException‘
解决:
各种尝试,结果是paramiko模块2.4版本无法识别gssapi,降为paramiko==2.3.1 正常
Appium问题解决方案(2)- AttributeError:module 'appium.webdriver' has no attribute 'Remote'
背景
运行脚本的时候,就直接报这个错误了,然后去看了下 appium.webdriver 库
结果发现啥都没有,就知道有问题了,然后一步步排查
步骤一
检查Appium-Python-Client 和 selenium 是否安装成功
pip show selenium
pip show Appium-Python-Client
步骤二
检查androidsdk、javajdk的环境变量是否配好
步骤三
检查appium-server的配置是否正确
然后
我发现以上步骤都没问题之后也还是不行....,只能用最原始的方法了
- 先卸载机子上所有Python版本
- 然后重装python3.6
- 再把所有需要用到的库安装好
结果...发现还是不行
在准备绝望的时候,搜了下百度,发现本机要装Nodejs
抱着鱼死网破的心态,把Nodejs装好之后,再跑!居然就可以了!(原来是我之前没装Nodejs)
结论
应该是Nodejs没有安装好,记住要配好Nodejs的环境变量哦!
总结
以上是小编为你收集整理的Appium问题解决方案(2)- AttributeError:module ''appium.webdriver'' has no attribute ''Remote'' 全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
原文地址:https://www.cnblogs.com/poloyy
AttributeError: ''module'' object has no attribute ''_create_unverified_context''
Python脚本提示如下错误:
Traceback (most recent call last):
File "XXX.py", line 7, in <module>
ssl._create_default_https_context = ssl._create_unverified_context()
AttributeError: ''module'' object has no attribute ''_create_unverified_context''
_create_unverified_context属性在Python2.7.9版本后才加入,如果你用的2.7.9之前的版本出现上述错误,则下载安装2.7.9之后的版本即可解决该问题。目前Python2.7的最新版本号是2.7.17。
https://www.python.org/downloads/release/python-2717/
AttributeError: ''Settings'' object has no attribute ''HBase''
django 自定义配置报错: AttributeError: ''Settings'' object has no attribute ''HBase''
如果我们需要用到 Hbase
的话,可以仿照 Mysql
一样,把相关的信息配置写入到 settings
文件中,但是我遇到了一个问题,就是无法导入。
In [12]: settings.HBASE
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-12-22bd47148938> in <module>
----> 1 settings.HBASE
~\.virtualenvs\twitter-5Z0qCgub\lib\site-packages\django\conf\__init__.py in __getattr__(self, name)
81 if self._wrapped is empty:
82 self._setup(name)
---> 83 val = getattr(self._wrapped, name)
84
85 # Special case some settings which require further modification.
AttributeError: ''Settings'' object has no attribute ''HBASE''
In [13]: settings.HBase
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-1ee0306304e8> in <module>
----> 1 settings.HBase
~\.virtualenvs\twitter-5Z0qCgub\lib\site-packages\django\conf\__init__.py in __getattr__(self, name)
81 if self._wrapped is empty:
82 self._setup(name)
---> 83 val = getattr(self._wrapped, name)
84
85 # Special case some settings which require further modification.
AttributeError: ''Settings'' object has no attribute ''HBase''
结果问题的排查发现,在 Django
的配置文件 settings
中,必须使用全部大小才能被导入。
HBase
--> HBASE
HBase = {
''default'': {
''HOST'': ''192.168.31.245'',
''PORT'': 9090
}
}
需要改为
HBASE = {
''default'': {
''HOST'': ''192.168.31.245'',
''PORT'': 9090
}
}
大小写错误! 不要在Django
的配置文件settings
中混合使用大小写,必须全部是大写!
从下面的文件中可以看到关键代码 if setting.isupper():
django/conf/__init__.py
class Settings:
def __init__(self, settings_module):
# update this dict from global settings (but only for ALL_CAPS settings)
for setting in dir(global_settings):
if setting.isupper():
setattr(self, setting, getattr(global_settings, setting))
# store the settings module in case someone later cares
self.SETTINGS_MODULE = settings_module
mod = importlib.import_module(self.SETTINGS_MODULE)
tuple_settings = (
"INSTALLED_APPS",
"TEMPLATE_DIRS",
"LOCALE_PATHS",
)
self._explicit_settings = set()
for setting in dir(mod):
if setting.isupper():
setting_value = getattr(mod, setting)
if (setting in tuple_settings and
not isinstance(setting_value, (list, tuple))):
raise ImproperlyConfigured("The %s setting must be a list or a tuple. " % setting)
setattr(self, setting, setting_value)
self._explicit_settings.add(setting)
AttributeError: 'Settings' object has no attribute 'TEMPLATE_CONTEXT_PROCESSORS'
使用Xadmin,执行makemigrations和migrate时运行报错提示:
AttributeError: ''Settings'' object has no attribute ''TEMPLATE_CONTEXT_PROCESSORS''
第一个解决办法:
setting.py文件添加以下信息:
TEMPLATE_CONTEXT_PROCESSORS = ( ''django.contrib.auth.context_processors.auth'', ''django.core.context_processors.auth'' ''django.core.context_processors.debug'', ''django.core.context_processors.media'', ''django.core.context_processors.static'', ''django.core.context_processors.tz'', ''django.contrib.messages.context_processors.messages'', ''learn_models.context_processors.test'',)
第二个解决办法:
https://github.com/sshwsfc/xadmin下载源码,因为github该Bug被修复了,而pypi没有更新导致的。
关于Centos6.5下安装jumpserver-1.4.1报错AttributeError: module 'gssapi' has no attribute 'GSSException'的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于Appium问题解决方案(2)- AttributeError:module 'appium.webdriver' has no attribute 'Remote'、AttributeError: ''module'' object has no attribute ''_create_unverified_context''、AttributeError: ''Settings'' object has no attribute ''HBase''、AttributeError: 'Settings' object has no attribute 'TEMPLATE_CONTEXT_PROCESSORS'的相关信息,请在本站寻找。
本文标签: