Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用原始base64表单和python xmlrpc客户端加载torrent文件_Python_Python 3.x_Torrent - Fatal编程技术网

无法使用原始base64表单和python xmlrpc客户端加载torrent文件

无法使用原始base64表单和python xmlrpc客户端加载torrent文件,python,python-3.x,torrent,Python,Python 3.x,Torrent,我正在尝试使用带有以下python3代码的xmlrpc将torrent文件加载到rtorrent中: import xmlrpc.client server_url = "https://%s:%s@%s/xmlrpc" % ('[REDACTED]', '[REDACTED]', '[REDACTED]'); server = xmlrpc.client.Server(server_url); with open("test.torrent", "rb") as torrent:

我正在尝试使用带有以下python3代码的xmlrpc将torrent文件加载到rtorrent中:

import xmlrpc.client

server_url = "https://%s:%s@%s/xmlrpc" % ('[REDACTED]', '[REDACTED]', '[REDACTED]');
server = xmlrpc.client.Server(server_url);

with open("test.torrent", "rb") as torrent:
    server.load.raw_verbose(xmlrpc.client.Binary(torrent.read()),"d.delete_tied=","d.custom1.set=Test","d.directory.set=/home/[REDACTED]/files")
load_raw
命令返回时没有错误(返回代码0),但torrent不会出现在rutorrent UI中。我似乎经历了与reddit post相同的事情,但我使用的是
Binary
类,没有任何运气

我用的是种子箱

编辑:

启用日志记录后,我看到

1572765194 E Could not create download, the input is not a valid torrent.
尝试加载torrent文件时,通过rutorrent UI手动加载torrent文件效果良好。

我需要添加
作为第一个参数:

server.load.raw_verbose("",xmlrpc.client.Binary(torrent.read()),"d.delete_tied=","d.custom1.set=Test","d.directory.set=/home/[REDACTED]/files")
不知道为什么,但事实似乎并没有表明这是必要的