草庐IT

some_name

全部标签

什么是SOME/IP-SD?

SOME/IP-SD是"Scalableservice-OrientedMiddlewarEoverIP-ServiceDiscovery"的缩写,是SOME/IP的一种特殊报文,可以让Client知道Server可以提供哪些服务,SOME/IP有两种动态发现服务的机制:一种是OfferService,由Server向网络上的小伙伴告知它所提供的服务;另一种是FindService,由Client向Server请求可用的服务。1.简介和概述该协议规范定义了SOME/IP-SD的格式、消息序列和语义。SOME/IP-SD主要任务是车载功能实体调用服务的通信可用性以及控制事件消息的发送行为。这种机

python - Django 导入错误 : No module named apps

我刚刚用git检查了一个项目。项目结构为projectappsmyappsettings__init__.py__init__.pymanage.py还有其他目录和文件,但我认为那些是重要的。当我运行服务器时,我得到Traceback(mostrecentcalllast):File"C:/Dev/project/apps/manage.py",line10,inexecute_from_command_line(sys.argv)File"C:\Python27\lib\site-packages\django\core\management\__init__.py",line385

python - "No module named time"

我使用以下代码从源代码编译了Python:wgethttp://python.org/ftp/python/2.6.6/Python-2.6.6.tar.bz2tarjxvfPython-2.6.6.tar.bz2cdPython-2.6.6./configuremakemakeinstallPython版本:as3:~#python-VPython2.6.6我也安装了pip安装程序,但是当我使用pipinstallxxx时,我总是得到以下错误:Traceback(mostrecentcalllast):File"/usr/local/bin/pip",line5,infrompkg_

python - TensorFlow freeze_graph.py : The name 'save/Const:0' refers to a Tensor which does not exist

我目前正在尝试将经过训练的TensorFlow模型导出为ProtoBuf文件,以便在Android上将其与TensorFlowC++API一起使用。因此,我正在使用freeze_graph.py脚本。我使用tf.train.write_graph导出了我的模型:tf.train.write_graph(graph_def,FLAGS.save_path,out_name,as_text=True)我正在使用通过tf.train.Saver保存的检查点。我按照脚本顶部的描述调用freeze_graph.py。编译后运行bazel-bin/tensorflow/python/tools/f

python - 导入错误 : no module named bson

我正在尝试在我的环境文件中导入json_util:frombsonimportjson_util我收到此导入错误:没有名为bson的模块。我尝试通过pip安装和卸载pymongo和bson-但似乎无济于事。我发现bson包包含在pymongo中,所以我明确安装了它,然后我收到了EPOCH_AWARE导入错误。目前只安装了pymongo。当我使用此行强制虚拟环境时,它会起作用:#subprocess.Popen(['/home/.virtualenvs/simple_worker/bin/python',fileName])但是当我尝试像这样通过操作系统运行它时:os.system('P

python - 从加密导入随机 -> ImportError : cannot import name Random

我已经将pycrypto(版本2.3)安装到/usr/local/lib/python2.6/dist-packages/Crypto/并且我能够在那里看到随机包。但是当我尝试导入Crypto.Random时,它让我很兴奋fromCrypto.Randomimport*ImportError:NomodulenamedRandom有谁知道为什么会发生这种情况?谢谢。importCryptoimportosprint(Crypto.__file__);print(dir(Crypto));print(os.listdir(os.path.dirname(Crypto.__file__))

Python: 'super' 对象没有属性 'attribute_name'

我正在尝试从基类访问一个变量。这是父类:classParent(object):def__init__(self,value):self.some_var=value这是子类:classChild(Parent):def__init__(self,value):super(Child,self).__init__(value)defdoSomething(self):parent_var=super(Child,self).some_var现在,如果我尝试运行这段代码:obj=Child(123)obj.doSomething()我得到以下异常:Traceback(mostrecent

python - Lisp 在 Python 中的 "some"?

我有一个字符串列表和一个过滤器列表(它们也是字符串,被解释为正则表达式)。我想要我的字符串列表中至少被一个过滤器接受的所有元素的列表。理想情况下,我会写[sforsinstringsifsome(lambdaf:re.match(f,s),filters)]其中一些被定义为defsome(pred,list):forxinlist:res=pred(x)ifres:returnresreturnFalsePython中是否已经提供了类似的东西,或者是否有更惯用的方法来做到这一点? 最佳答案 有一个函数叫做any这确实大致想要你想要的

python - 从 matplotlib.backends 导入 _tkagg ImportError : cannot import name _tkagg

尝试运行this测试matplotlib如何与Tkinter一起工作的示例,我收到错误:(env)fieldsofgold@fieldsofgold-VirtualBox:~/new$pythontest.pyTraceback(mostrecentcalllast):File"test.py",line7,infrommatplotlib.backends.backend_tkaggimportFigureCanvasTkAgg,NavigationToolbar2TkAggFile"/home/fieldsofgold/new/env/local/lib/python2.7/sit

python - 如何修复 ImportError : No module named packages. urllib3?

我在Ubuntu机器上运行Python2.7.6。当我在终端中运行twill-sh(Twill是一种用于测试网站的浏览器)时,我得到以下信息:Traceback(mostrecentcalllast):File"dep.py",line2,inimporttwill.commandsFile"/usr/local/lib/python2.7/dist-packages/twill/__init__.py",line52,infromshellimportTwillCommandLoopFile"/usr/local/lib/python2.7/dist-packages/twill/s