- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
自从我将 win 10 版本 1703 升级到版本 1709(秋季更新)后,在使用 print
或 nose
命令。我的 nose
日志:
======================================================================
ERROR: test_future_link_to_update_3
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\case.py", line 134, in run
self.runTest(result)
File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\case.py", line 152, in runTest
test(result)
File "c:\program files\python35\Lib\unittest\case.py", line 653, in __call__
return self.run(*args, **kwds)
File "c:\program files\python35\Lib\unittest\case.py", line 621, in run
result.addSuccess(self)
File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\proxy.py", line 165, in addSuccess
self.result.addSuccess(self.test)
File "c:\program files\python35\Lib\unittest\runner.py", line 64, in addSuccess
self.stream.flush()
OSError: raw write() returned invalid length 2 (should have been between 0 and 1)
我可以通过评论 self.stream.flush()
来解决这个问题,但这不是解决方案:
def addSuccess(self, test):
super(TextTestResult, self).addSuccess(test)
if self.showAll:
self.stream.writeln("ok")
elif self.dots:
self.stream.write('.')
# self.stream.flush()
使用print
时的其他日志:
Traceback (most recent call last):
File "c:\program files\python35\Lib\multiprocessing\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "c:\program files\python35\Lib\multiprocessing\pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "C:\Users\SDN\Work\git\pop-extrapole\extrapolation\extrapole.py", line 1463, in popcorn_process
print(lk)
OSError: raw write() returned invalid length 46 (should have been between 0 and 23)
有人对此有想法吗?
谢谢,乌维维尔
最佳答案
你使用“Git for Windows”的 bash 吗?
如果使用,请尝试在\Program Files\Git\git-bash.exe
和\Program Files\Git\usr\bin\的属性设置中加入管理员权限bash.exe
.
我可以用它来解决。但我认为这不是最佳解决方案。
另一种解决方案是使用 PowerShell。
关于python - 使用 nosetest 或 print 时 oserror python 3.5.4 on win 10 1709,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47075627/
我正在尝试在 Ubuntu 上运行 Python3,但遇到了一些奇怪的错误。该脚本显然无法找到我已确认存在的文件。 这是错误 Traceback (most recent call last):
我将大量文件写入一个文件夹,没有子目录,但是在写入 280 万个文件后,出现此错误: with open(bottleneck_path, 'w') as save_file: OSError: [E
我已经编写了自己的模块,主要处理 django 站点的文件字段。在弄乱了一些与 mod_wsgi 相关的东西之后(通过更新到 3.3 解决),我让我的代码运行。在所有必要的导入之后,在定义任何类或函数
我有以下代码: except(OSError) as (errno, strerror, filename): print "OSError [%d]: %s at %s" % (errno, str
由于某种原因,在使用 fromtimestamp 构造日期时间时,当我使用小于 -43200(-12 小时)的负数时,我得到一个“OSError [Errno22] Invalid Argument”
在声明 Theano 符号函数时,我得到一个 OSError 和回溯。有趣的是,相同的代码在不同的机器上运行。一台机器配置为使用 GPU,而另一台(有错误)仅配置为 CPU。有其他人经历过这种行为并知
我正在尝试创建一本新词典。 import os import datetime parent_dir = "E:\\" directory = "cali" now = datetime.dateti
我想像这样处理特定的 OSError 代码: try: os.scandir() except OSPermissionError as error: # Only catch er
我正在尝试在我的 Linux Ubuntu 64 位机器上安装 pycryptodomex 和 pycrypto。但是,我一直收到此错误:(提前致谢!) haomin@haomin-R110CS:~$
我有以下要测试的 python 代码: def find_or_make_logfolder(self): if not path.isdir(self.logfolder):
当我尝试将 OCRopus(基于 python 的 OCR 工具)应用于 TIFF 图像时,出现以下 python 错误: Traceback (most recent call last):
我在 Tensorflow 之上使用 Python 和 Keras 来训练我的神经网络。当我从 Ubuntu 16.04 切换到 Windows 10 时,运行以下命令时无法再保存我的模型: file
问题陈述 我正在使用 python3 并尝试 pickle 一个 IntervalTrees 字典,它的重量大约为 2 到 3 GB。这是我的控制台输出: 10:39:25 - project: IN
我一直在寻找一些对某些人来说可能相对愚蠢但对我来说非常有趣的东西! :-) 在 Python 3.3 中,输入和输出错误已与 OSError 合并,因此异常类层次结构发生了变化。内置类 OSError
如果我只是这样做: import lightgbm as lgb 我得到了 python script.py Traceback (most recent call last): File "scri
我有以下代码试图在 Linux 中启动下面的每个“命令”。如果两个命令中的任何一个因任何原因崩溃,该模块会尝试保持每个命令都运行。 #!/usr/bin/env python import subpr
我想执行以下简单的服务器代码: import socket s = socket.socket() # Create a socket object host = socket.get
我正在尝试在带有配置的 Power PC 上运行以下代码: Operating System: Red Hat Enterprise Linux Server 7.6 (Maipo) CPE OS N
当我尝试通过 django 管理界面上传媒体文件时,出现此错误: OSError: [Errno 45] Operation not supported 这是回溯的最后一行: File "/pat
使用 uwsgi 和 nginx 运行 Django 3 python 3.6 应用程序会抛出太多这些!我花了太多时间试图弄清楚,所以欢迎任何帮助。 它们绝对不是客户端断开连接。在网上查找时,我发现了
我是一名优秀的程序员,十分优秀!