- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在 Windows 10 上通过 Anaconda 使用 IPython 3.4(是的,我知道)。我在虚拟机上的 Ubuntu 中使用相同版本的 IPython 编写了一个脚本,并尝试在 Windows 端运行它。我一直在尝试解决 Linux 中使用“/”作为文件路径(而不是 Windows 中使用“\”)的问题。我尝试简单地将 Windows 端的所有“/”实例转换为“\”,但仍然收到以下错误:
OSError: [Errno 22] Invalid argument:
C:\\Users\\mike\\Desktop\\S15 NWEA\\Combined_CSVs\\Students_All 2015-08-27 20:12:34.csv'
我希望有一个简单的解决方案。有吗?
这是整个错误输出:
OSError Traceback (most recent call last)
<ipython-input-5-b1a80a7377c7> in <module>()
37 Sframe = pd.concat(list,ignore_index=False)
38
---> 39 Sframe.to_csv(str(out_folder)+'\Combined_CSVs\Students_All '+str(st)+'.csv', sep=',')
40 ##Concatenate fields and check for duplicates
41 Sframe["TermSchoolStudent"]=Sframe["TermName"]+Sframe["SchoolName"]+Sframe["StudentID"].map(str)
C:\Users\mike\Anaconda3\lib\site-packages\pandas\core\frame.py in to_csv(self, path_or_buf, sep, na_rep, float_format, columns, header, index, index_label, mode, encoding, quoting, quotechar, line_terminator, chunksize, tupleize_cols, date_format, doublequote, escapechar, decimal, **kwds)
1187 escapechar=escapechar,
1188 decimal=decimal)
-> 1189 formatter.save()
1190
1191 if path_or_buf is None:
C:\Users\mike\Anaconda3\lib\site-packages\pandas\core\format.py in save(self)
1440 else:
1441 f = com._get_handle(self.path_or_buf, self.mode,
-> 1442 encoding=self.encoding)
1443 close = True
1444
C:\Users\mike\Anaconda3\lib\site-packages\pandas\core\common.py in _get_handle(path, mode, encoding, compression)
2827 f = open(path, mode, encoding=encoding)
2828 else:
-> 2829 f = open(path, mode, errors='replace')
2830 else:
2831 f = open(path, mode)
OSError: [Errno 22] Invalid argument:
C:\\Users\\mike\\Desktop\\S15 NWEA\\Combined_CSVs\\Students_All 2015-08-27 20:12:34.csv'
提前致谢,迈克尔
最佳答案
问题出在输出 CSV 中名为 2015-08-27 20:12:34.csv 的部分。在 Linux 中,我可以在文件名中使用破折号和冒号,但在 Windows 中却不行。
关于python - IPython 从 Ubuntu 到 Windows UNC 路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32261536/
好吧,我已经在这个问题上挣扎了很长时间了。我有一个项目来比较两个文件夹,两台服务器各一个。我们正在将源服务器上的文件与目标服务器上的文件进行比较,并将创建一个源文件列表,一旦目标服务器上完成更新,就需
我有一个 UNC 路径 \\houtester\common\log library\graphics 我需要在我的 c# 程序中使用它,显然它不会不会因为那个空白空间。我怎样才能让这条路起作用? 谢
我有一个 C# 进程需要读取远程服务器共享目录中的文件。 以下代码导致“共享不存在”。正在写入控制台。 string fileName = "someFile.ars"; string fileLoc
我的电脑装有 Windows XP,但没有互联网连接,只能访问网络驱动器。我想在网络驱动器上设置一个 git 存储库,然后从我的本地存储库推送到它,这样我就可以在一天结束时去一台有互联网连接的计算机并
是否有用于从 UNC 路径确定 NAS 存储上的可用空间的编程 API?我查看了 WMI 文档,并不清楚这是可能的。 非常感谢代码示例和对相关 API 调用的引用。 最佳答案 在 Windows AP
这是我遇到的问题: # The following line works Add-Content -LiteralPath "$Env:USERPROFILE\Desktop\[Test].txt"
我在从 Delphi 程序写入 Windows 7 中的映射网络驱动器 (P:) 时遇到一些问题。例如,当我尝试 ForceDirectories('P:\test\folder') 时,出现错误(找
我在为 Outlook 编写的 VSTO 加载项中有以下代码: savefolder = Regex.Replace(Guid.NewGuid().ToString(), @"[- ]
我正在尝试从 UNC 路径名的根获取文件夹和文件。我正在使用 Get-ChildItem。 我可以通过 UNC 路径从子文件夹获取结果,但不能从根文件夹获取结果。如果从命令行运行命令Get-Child
如果用户尚未安装远程驱动器并且仅使用 \\ 语法,如何将字符串中保存的此类路径 (\\nas) 转换为Java 中的文件,抱歉不太确定您如何称呼此 \\ 命名。 这个也是windows特有的吗,也可以
我们有似乎运行良好的批处理脚本,但是我正在编辑其中一个脚本以包含一些新工作,并且在手动运行脚本时(通过在 Windows 资源管理器中双击),每次在脚本中执行 pushd 命令时,我都会收到上述错误消
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 10 年前。 Improve thi
我正在编写一个应用程序,需要从当前正在执行文件的网络目录中复制文件。 我试过用打开文件 using (var source = new FileStream(fileData.FileName,
我正在尝试使用以下代码检索一个目录的文件列表: string[] files = System.IO.Directory.GetFiles(source); 如果我尝试从本地目录检索它们,假设是 C:
我看到了很多示例,但我没有找到适合我的问题的东西。 这个问题是:我有一个用 C# 编写的程序。我使用的是 clickonce UNC 系统。 有了桌面上的快捷方式,就没有问题了。 但我想要针对特定
我正在研究一种在同一台远程机器上复制大文件的高效解决方案,我们称它为 FILESERVER。然后,我想从另一台服务器 (WEBSERVER) 远程发布这些文件的副本,所以我尝试使用 Windows 资
可能听起来很疯狂,但我想将一些 javadoc 文档链接到网络上存在的文件。这是从标准 UNC 路径访问的。 我想使用如下方式链接: /** * This class does something
同题;如何访问 ShareFolder 中的 UNC 位置? URL uri = new URL("file:\\\\x.x.1.10\\myUNC"); File file = new File(u
我正在寻找一种从映射网络驱动器获取“真实”UNC 路径的方法——这是一个常见问题,但没有使用我想要的语言或方法。 我希望用户能够使用 HTML 表单选择文件,但不能上传它(文件很大)。我只想获得文件的
我正在从我的程序(用 C++ 编写)连接到一个 unc 服务器 (\blablub\share)。现在我正在使用 WNetUseConnection 函数连接到服务器。现在我只想限制对程序的访问。因为
我是一名优秀的程序员,十分优秀!