Python send2trash模块值错误

Python send2trash模块值错误,python,Python,我试图使用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 >>>

我试图使用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
Python 3.5.4(v3.5.4:3f56838,2017年8月8日,02:17:05)[MSC v.1900 64位
(AMD64)]在win32上
有关详细信息,请键入“copyright”、“credits”或“license()”。
>>>进口send2trash
>>>send2trash.send2trash(r“C:\Users\Ian\Desktop\tMorph\tMorph.dll”)
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
send2trash.send2trash(r“C:\Users\myusernamehere\Desktop\tMorph\tMorph.dll”)
文件“C:\Users\myusernamehere\AppData\Local\Programs\Python\Python35\lib\site-
packages\send2trash\plat_win.py”,第49行,在send2trash中
fileop.pFrom=LPCWSTR(路径+'\0')
ValueError:嵌入的空字符
我在不同的位置尝试了多个文件,但仍然得到完全相同的错误


谢谢

升级到send2trash版本1.4.2修复了我的问题

升级到send2trash版本1.4.2修复了我的问题

是否要求您使用Python 2?是否要求您使用Python 2?这是100%的问题。我更新了,现在已经修好了。谢谢这是100%的问题。我更新了,现在已经修好了。谢谢