我试图使用python中的send2trash模块来执行“自动化无聊的事情”,但我始终收到以下错误:
Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit
(AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import send2trash
>>> send2trash.send2trash(r"C:\Users\Ian\Desktop\tMorph\tMorph.dll")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
send2trash.send2trash(r"C:\Users\myusernamehere\Desktop\tMorph\tMorph.dll")
File "C:\Users\myusernamehere\AppData\Local\Programs\Python\Python35\lib\site-
packages\send2trash\plat_win.py", line 49, in send2trash
fileop.pFrom = LPCWSTR(path + '\0')
ValueError: embedded null character
我在不同的位置尝试了多个文件,但仍然得到完全相同的错误。在
谢谢!在
升级到send2trash版本1.4.2修复了这个问题
相关问题 更多 >
编程相关推荐