一、环境准备
1、Python版的安装:
在openwrt12.09系统必须安装如下包:
libcurl
libopenssl
kmod-nls-utf8
Python
python-curl
安装以上包需要4M左右的空闲空间,如空间空间不足,只有通过u盘来扩展了,这个是没法精简了,除非有能人自己编译把不需要的删除了。 如是其它版本系统,请对应的安装相应的包。
Windows系统上安装SyncY:
分别安装如下几个包
python2.7
pywin32
pycurl
pycrypto
以上包在本地下载里面有下载。windows系统上配置文件默认和程序文件在一个文件夹下面,如果不在一个文件夹下面,请修改syncy.py文件中的配置文件地址。配置文件中设置的文件夹分隔符请使用“/”,而不要使用windows默认的“\”,如D盘下的test目录,请设置为“d:/test”。Windows系统默认字符集为GBK,如果同步下来的中文文件名存在乱码,请根据自己的系统环境修改字符集,用编辑器打开syncy.py文件,搜索“__CHARSET__ = ‘GBK’”,把GBK改成需要的字符集即可。
加密设置注意事项(v2.5.0及之后版本):
一旦启用加密,请牢记密钥及设置的加密方法,将来下载文件时加密密钥或加密方法错误将会导致下载的文件数据不正确。某个同步文件夹一旦设置为启用加密,所有上传和下载的文件都将进行加密或解密操作,因此云端的加密文件夹下面请勿手动添加明文文件!如果已有文件上传至云端,要想修改加密方法或密钥,最好全部重新上传所有文件,否则会导致云端存在不同加密方法或密钥加密出来的文件,将来下载时将无法区分,导致部分文件无法解密!
加密设置请参考配置文件说明。
Perl和Bash版已不再提供支持,请安装Python版,Python V2版支持多任务多线程,功能更强。
2、Perl v1.0.4版的安装:
1.0.4 Perl版及之后的是精简过后的,安装包少了不少,安装空间占用在1M左右,安装包如下:
libcurl
libopenssl
kmod-nls-utf8
perl
perlbase-essential
perlbase-digest
perl-www-curl
perlbase-xsloader
perlbase-dynaloader
perlbase-config
perlbase-autoloader
perlbase-utf8
如是其它系统,请对应的安装相应的包,在cpan.org网站上可通过perlbase-后面的名称来搜索相应的包并下载源码,各个包还可能依赖别的包,如运行报错,提示缺少包,请根据提示安装相应的包。
3、Bash版的安装:
Bash版的安装在openwrt上需要以下包:
curl
libopenssl
kmod-nls-utf8
bash
bash版本最好是4.2的,3.x版的使用存在一些问题,curl能安装最新版最好安装最新版,其他类型系统请对应安装相应的包。
二、安装SyncY
1、OpenWrt系统(含luci界面): OpenWrt系统安装最新的luci版本(只有Python和Perl语言的有)的,下载安装包并上传到tmp目录,完成后执行 #opkg install /tmp/SyncY-Python-luci_1.0.10-1_all.ipk(Perl版对于修改文件名),后面的配置从luci界面配置即可。
2、ssh安装:
a)、复制配置文件syncy到/etc/config目录下,复制syncy.py到/usr/bin目录下,授予syncy.py可执行权限;
b)、执行syncy.py获取用户码, 获取用户码后按照提示打开百度授权页面https://openapi.baidu.com/device,如下图:
输入用户码(用户码有效期30分钟),输入完成用户码后点“继续”按钮进入授权确认界面,如下图:
最后点“授权”完成授权。
c)、完成授权后回到ssh终端按回车键完成本地的授权操作,但显示“Get device token success.”表示授权完成。
三、设置自动启动
只适用于OpenWrt系统不含luci的Python版和Perl版,含luci的在安装时已经设置了相应内容,只需要在luci界面上配置即可,bash版只能通过计划任务来设置。
在/etc/init.d目录下建立syncy文件并授予可执行权限,文件内容如下:
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=99
STOP=10
start() {
/usr/bin/syncy.py &
}
stop() {
[ -e /var/run/syncy.pid ] && {
sypid=$(cat /var/run/syncy.pid)
kill $sypid
}
}
restart() {
[ -e /var/run/syncy.pid ] && {
sypid=$(cat /var/run/syncy.pid)
kill $sypid
}
sleep 1
/usr/bin/syncy.py &
}
保存文件并执行#/etc/init.d/syncy enable来启用自动启动,Perl版对应的吧syncy.py改成syncy.pl。其他类型的系统请参照设置,不了解的可以百度一下。
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1277, in
sy = SyncY(sys.argv[1:])
File “/usr/bin/syncy.py”, line 107, in __init__
http_code = self.__curl_request(‘https://syncyhome.duapp.com/syserver’,’method=bind_device&scope=basic,netdisk’,’POST’,’normal’)
File “/usr/bin/syncy.py”, line 314, in __curl_request
curl = pycurl.Curl()
pycurl.error: initializing curl failed
提示这个错误不知道是什么原因!
之前也有人反映此问题,就是pycurl的问题,你重新安装下看看,pycurl依赖的包有libcurl、libopenssl。
root@PogoPlug:/tmp# python /usr/bin/syncy.py
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1277, in
sy = SyncY(sys.argv[1:])
File “/usr/bin/syncy.py”, line 107, in __init__
http_code = self.__curl_request(‘https://syncyhome.duapp.com/syserver’,’method=bind_device&scope=basic,netdisk’,’POST’,’normal’)
File “/usr/bin/syncy.py”, line 314, in __curl_request
curl = pycurl.Curl()
pycurl.error: initializing curl failed
同样出这样的错误。
设备系统信息:
主机名 PogoPlug
Model Pogoplug Pro
固件版本 OpenWrt Barrier Breaker 20140503 / LuCI Trunk (svn-r10180)
内核版本 3.13.7
本地时间 Wed May 7 11:55:09 2014
运行时间 1h 31m 16s
平均负载 0.00, 0.05, 0.06
python-curl(pycurl)的问题,之前也有网友有这个问题,好像是重新安装解决的,要不你也重新安装试试,卸载后先看看,删除后看看/usr/lib/python2.7/site-packages下面的文件,如果存在pycurl相关的先删除或重名下。
root@PogoPlug:/# python usr/bin/syncy.py
2014-05-07 23:33:01 WARNING: Request failed,wait 3s to retry(1). Curl(6): Couldn’t resolve host ‘syncyhome.duapp.com’.
2014-05-07 23:33:02 WARNING: Request failed,wait 3s to retry(2). Curl(6): Couldn’t resolve host ‘syncyhome.duapp.com’.
2014-05-07 23:33:02 WARNING: Request failed,wait 3s to retry(3). Curl(6): Couldn’t resolve host ‘syncyhome.duapp.com’.
2014-05-07 23:33:02 ERROR: Get device code failed, .
搞好一部分了,现在又成这样了
完整安装后,Luci界面中无管理.
你的系统是什么?这个还是第一次有人反馈这个问题。
我的也没有管理配置项出来,openwrt 内存是3.18.9
你好,你重启下路由,或重新安装下ipk文件看看。
centos对应的需要安装的环境如下:
yum install -y python libcurl openssl python-pycurl
在luci设置界面里,开机自动启动,已打钩,接下来一项:启动…项,按钮总显示“启动”, SyncY尚未启动…….,点启动后,变为停止运行按钮,SyncY正在运行…….,但只要离开syncy luci设置界面就会回到显示“启动”, SyncY尚未启动…….,不知道什么原因?也不能和百度网盘同步,也没有错误提示。
你用的是什么版本的系统,之前有位网友也是这个问题,用的是openwrt.cn上下的系统,那个系统的luci保存的配置文件有问题,配置文件中的关键字都加上了单引号,导致程序不能识别启动出错,且还没有日志。你也从ssh登陆看下配置文件,看看是不是也存在这个问题,要是也是这个问题的话就只能通过ssh来修改配置。
MW3520 OPENWRT网友编译版,/etc/config/syncy如下
config syncy
option blocksize ’10’
option ondup ‘rename’
option datacache ‘on’
option excludefiles ‘*/Thumbs.db’
option listnumber ‘100’
option retrytimes ‘3’
option retrydelay ‘3’
option maxsendspeed ‘0’
option maxrecvspeed ‘0’
option syncperiod ‘0-24’
option syncinterval ‘3600’
option helptext ‘…………………’
option syncyerrlog ‘/mnt/sda2/Baidu/SYNCERR.log’
option syncylog ‘/mnt/sda2/Baidu/SYNC.log’
config syncytoken
config syncpath
option enable ‘1’
option localpath ‘/mnt/sda2/Baidu’
option remotepath ‘/’
option synctype ‘download+’
关键字没问题,但发现怎么有些单引号是中文的单引号,必须是英文半角下的单引号程序才可识别。
Can’t load ‘/usr/lib/perl5/5.20/auto/WWW/Curl/Curl.so’ for module WWW::Curl: Fil e not found at /usr/lib/perl5/5.20/XSLoader.pm line 62.
at /usr/lib/perl5/5.20/WWW/Curl.pm line 8.
Compilation failed in require at /usr/lib/perl5/5.20/WWW/Curl/Easy.pm line 9.
BEGIN failed–compilation aborted at /usr/lib/perl5/5.20/WWW/Curl/Easy.pm line 9 .
Compilation failed in require at /usr/bin/syncy.pl line 18.
BEGIN failed–compilation aborted at /usr/bin/syncy.pl line 18.
Undefined subroutine &WWW::Curl::_global_cleanup called at /usr/lib/perl5/5.20/W WW/Curl.pm line 11.
END failed–call queue aborted at /usr/bin/syncy.pl line 18.
一样都是curl 报错
无论perl 或者python
Libcurl 安装了吗?
安装了
系统是什么版本的?有的版本确实有些奇怪的问题。
Powered by LuCI Trunk (svn-r10467) OpenWrt Barrier Breaker 14.07-rc3
版本还挺新,不知道是不是你这个版本的库文件有问题还是什么原因,很多库文件是需要针对特定版本编译的。
我的是官方的12.09。
作者你好,我在我的路由器上面安装了最新的 python版,由于flash 容量我把所欲的依赖包括软件都安装到U盘里面的。
我也将init.t / syncy 的启动文件里面的syncy.py 这个文件路径修改成了现在实际安装的路径,etc/config 文件也在里面放着。
当我用命令./syncy start 的时候 报错了。如下
File “/mnt/sda5/packages/usr/bin/syncy.py”, line 22, in
import pycurl
ImportError: File not found
一下组件我都安装了的。
libcurl
libopenssl
kmod-nls-utf8
Python
python-curl
求解,现在无法启动,,
这个问题有几个网友遇到过,具体原因不是很明确。
你看下/usr/lib/python2.7/site-packages/目录下有没有curl目录及两个pycurl相关的文件,curl目录下还有个__init__.py文件。
最新版Python版 1.0.14
root@OpenWrt:~# /usr/bin/syncy.py
Traceback (most recent call last):
File “/usr/lib/python2.7/encodings/__init__.py”, line 100, in search_function
level=0)
File “/usr/lib/python2.7/encodings/ascii.py”, line 1
SyntaxError: Non-ASCII character ‘\xb6’ in file /usr/lib/python2.7/encodings/ascii.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
提示这样是什么问题啊?
这个是编码转码的问题,先测试下只有英文文件名能不能上传或下载。如果都是英文的可以的话再看是哪个文件不行,文件名最好不要用什么很特别的特殊字符。
另外再检查下安装了utf8的支持包了没有。
已经搞好了,原来的问题是获取不到用户码,后来把那些依赖包和SyncY都删除了重新安装一遍就好了
我的路由是OP的trunk固件,装的是libcurl,libopenssl,kmod-nls-utf8,和barrier_breaker/14.07-rc3的python-mini,python,python-curl这些依赖包,希望有和我一样固件的人有些参考。
弄好了就好,相同版本的可以参考下。
我是路由宝刷的潘多拉 14.09 固件 也是第一次装的时候没有无法获取用户码,后来重新刷的固件安装的http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages源里找的
libffi_3.0.13-1_ramips_24kec.ipk
python_2.7.3-2_ramips_24kec.ipk
python-curl_7.19.0-1_ramips_24kec.ipk
python-mini_2.7.3-2_ramips_24kec.ipk
这四个依赖包(这几个依赖包不在一个目录里)ok,绑定成功。
后续还没有测试,测试完后再来报告。
测试成功,可以下载文件到本地。期待稳定运行。
感谢WishInLife大编写这么棒的程序。谢谢!
已经搞好了,原来的问题是获取不到用户码,后来把那些依赖包和SyncY都删除了重新安装一遍就好了
你好。这个可以装到西部数据的my cloud nas上吗?如果可以能写一下安装步骤吗?
不知道my cloud nas是什么系统,要是linux的,且能安装上python和libcurl的话就没问题,只能试试看了,我没有相关产品,没法测试,也就没法写出安装方法了。
2015-01-25 01:49:43 ERROR: Transfer thread exception error occurred, error: No JSON object could be decoded .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1602, in run
responses = json.loads(responses)
File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
2015-01-25 01:49:44 ERROR: Transfer thread exception error occurred, error: No JSON object could be decoded .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1602, in run
responses = json.loads(responses)
File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
2015-01-25 01:49:44 ERROR: Download file “/apps/syncy/baidu/010115-772-carib-720p.mp4” failed.
2015-01-25 01:49:44 ERROR: Transfer thread exception error occurred, error: No JSON object could be decoded .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1602, in run
responses = json.loads(responses)
File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
2015-01-25 01:49:44 ERROR: Transfer thread exception error occurred, error: No JSON object could be decoded .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1602, in run
responses = json.loads(responses)
File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
2015-01-25 01:49:44 ERROR: Download file “/apps/syncy/baidu/010115-001-carib-720p.mp4” failed.
2015-01-25 01:49:55 ERROR: Transfer thread exception error occurred, error: No JSON object could be decoded .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1602, in run
responses = json.loads(responses)
File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
2015-01-25 01:49:55 ERROR: Transfer thread exception error occurred, error: No JSON object could be decoded .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1602, in run
responses = json.loads(responses)
File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
2015-01-25 01:49:55 ERROR: Download file “/apps/syncy/baidu/010215_002.avi” failed.
2015-01-25 01:49:55 ERROR: Transfer thread exception error occurred, error: No JSON object could be decoded .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1602, in run
responses = json.loads(responses)
File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
2015-01-25 01:49:55 ERROR: Transfer thread exception error occurred, error: No JSON object could be decoded .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1602, in run
responses = json.loads(responses)
File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
2015-01-25 01:49:55 ERROR: Download file “/apps/syncy/baidu/010415-774.mp4” failed.
老大帮帮我看看这是什么原因
只要运行程序就这样吗?要是的话加我qq57956720。
[root@PandoraBox:/root]#/usr/bin/syncy.py
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 28, in
import pycurl
ImportError: File not found
大哥,这是什么情况造成的?
是否已经安装了python-curl?如果安装了,顺序执行下下面的命令,然后把结果贴出来,最好加下我qq57956720。
#python
>>>import sys
>>>sys.path
把输出的结果发给我。
#python
>>>import sys
>>>sys.path
[”, ‘/mnt/sda1/opt/usr/lib/python27.zip’, ‘/mnt/sda1/opt/usr/lib/python2.7’, ‘/mnt/sda1/opt/usr/lib/python2.7/plat-linux2’, ‘/mnt/sda1/opt/usr/lib/python2.7/lib-tk’, ‘/mnt/sda1/opt/usr/lib/python2.7/lib-old’, ‘/mnt/sda1/opt/usr/lib/python2.7/lib-dynload’, ‘/mnt/sda1/opt/usr/lib/python2.7/site-packages’]
怎么增加 pycurl ?
看你的sys.path没什么异常,只是安装目录不是默认的,看看/mnt/sda1/opt/usr/lib/python2.7/site-packages文件家下面有没有pycurl.so文件,以及文件夹curl。如果不存在,搜索下pycurl.so这个文件在哪个文件家下面。
另外,你执行下以下命令,看能不能顺利执行:
# python
>>>import time
>>>time.sleep(1)
最好加下我qq:57956720,方便沟通。
WD MyCloud安装SyncY-Python-V1.0.15,每次开机通过putty运行“nohup /usr/bin/syncy.py &”运行软件,同步20多G的照片视频以后,再次开机运行没有响应,重启MyCloud后运行“/usr/bin/syncy.py”得以下内容:
2015-02-07 23:10:02 WARNING: Request failed, wait 3 seconds and try again(1). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:512085286}.
2015-02-07 23:10:06 WARNING: Request failed, wait 3 seconds and try again(2). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:1836131913}.
2015-02-07 23:10:10 WARNING: Request failed, wait 3 seconds and try again(3). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:1236909550}.
2015-02-07 23:10:14 ERROR: Get pcs quota failed(error code:401),{“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:3852136165}.
2015-02-07 23:10:14 Start sync path: “/shares/BaiduYun:/WDCloud:sync”.
2015-02-07 23:10:16 WARNING: Request failed, wait 3 seconds and try again(1). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:2420318792}.
2015-02-07 23:10:20 WARNING: Request failed, wait 3 seconds and try again(2). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:2683330176}.
2015-02-07 23:10:24 WARNING: Request failed, wait 3 seconds and try again(3). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:2559171332}.
2015-02-07 23:10:28 ERROR: Get file list failed(error code:401): /apps/SyncY/WDCloud, {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:1802136919}.
2015-02-07 23:10:28 Sync path: “/shares/BaiduYun:/WDCloud:sync” failed, 0 files success, 0 files failed, 1 errors occurred.
2015-02-07 23:10:28 ERROR: Sync path: “/shares/BaiduYun:/WDCloud:sync” failed, 0 files success, 0 files failed, 1 errors occurred.
2015-02-07 23:10:29 WARNING: Request failed, wait 3 seconds and try again(1). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:822918126}.
2015-02-07 23:10:33 WARNING: Request failed, wait 3 seconds and try again(2). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:3188115761}.
2015-02-07 23:10:38 WARNING: Request failed, wait 3 seconds and try again(3). Http(401): {“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:2636197803}.
2015-02-07 23:10:42 ERROR: Get pcs quota failed(error code:401),{“error_code”:110,”error_msg”:”Access token invalid or no longer valid”,”request_id”:1819278018}.
请问是什么问题,谢谢。
access token无效的问题,应该是在刷新了access token后没有正确的保存下来,建议升级下syncy的版本,安装新版的,然后重新绑定下,应该就不会有这个错误了。
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1728, in
sy = SyncY(sys.argv[1:])
File “/usr/bin/syncy.py”, line 255, in __init__
threadtest.join(1)
File “/usr/lib/python2.7/threading.py”, line 652, in join
raise RuntimeError(“cannot join thread before it is started”)
RuntimeError: cannot join thread before it is started
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1728, in
sy = SyncY(sys.argv[1:])
File “/usr/bin/syncy.py”, line 255, in __init__
threadtest.join(1)
File “/usr/lib/python2.7/threading.py”, line 652, in join
raise RuntimeError(“cannot join thread before it is started”)
RuntimeError: cannot join thread before it is started
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1728, in
sy = SyncY(sys.argv[1:])
File “/usr/bin/syncy.py”, line 255, in __init__
threadtest.join(1)
File “/usr/lib/python2.7/threading.py”, line 652, in join
raise RuntimeError(“cannot join thread before it is started”)
RuntimeError: cannot join thread before it is started
安装后一直是这个错误,楼主帮忙看一下?
把threadtest.join(1)这一行注释了应该就可以了,只有255行这一处。
WDMyCloud:/nfs/Baidu# /usr/bin/syncy.py
2015-03-02 16:40:32 PCS quota is 3177G,used 2742G.
2015-03-02 16:40:32 ERROR: The 1’s of syncpath setting is invalid.
2015-03-02 16:40:32 PCS quota is 3177G,used 2742G.
老板这个怎么搞啊。
应该是你的配置文件有问题,且是第一个syncpath节设置有问题,请参考http://syncyhome.duapp.com/index.php/syncyconfighelp/来设置配置文件,如果是在windows上修改的配置文件,注意换行符。
如果设置完了还是不对,就把你的配置文件贴出来看看。
config syncy
option syncyerrlog ”
option syncylog ”
option blocksize ’10’
option ondup ‘rename’
option datacache ‘on’
option excludefiles ‘*/Thumbs.db’
option listnumber ‘100’
option retrytimes ‘3’
option retrydelay ‘3’
option maxsendspeed ‘0’
option maxrecvspeed ‘0’
option speedlimitperiod ‘0-0’
option syncperiod ‘0-24’
option syncinterval ‘3600’
option tasknumber ‘2’
option threadnumber ‘2’
config syncpath
option localpath ‘/nfs/Baidu’
option remotepath ‘/Baidu’
option enable ‘1’
option synctype ‘sync’
config syncytoken
WDMyCloud:/nfs/Baidu# /usr/bin/syncy.py
2015-03-02 16:40:32 PCS quota is 3177G,used 2742G.
2015-03-02 16:40:32 ERROR: The 1’s of syncpath setting is invalid.
2015-03-02 16:40:32 PCS quota is 3177G,used 2742G.
老板这个怎么搞啊。
才看到已贴出了配置文件,你这个配置文件中第二个同步目录只有一个头,没有相应的内容,你把最后一行的config syncytoken删除了应该就可以了。
我也遇到 PCS quota 这行卡住不动的情况,终端跑了几次都不行,配置文件也检查了。
后来在 LuCi 中运行操作是成功的,测试了文件同步正常。
怎么样查看同步速度,设置了不限速,把任务设置成1个,线程设置成5,无法跑满带宽,设置成2个任务,线程2一样无法跑满带宽,所以想实时查看一下到底速度是多少
你好,SyncY程序本身没法查看同步速度,只能通过系统或路由来查看同步速度,我家是10M宽带,只要下载的不是很冷门的东西2任务2线程就可以满速下载了。
另外,同步速度的快慢跟同步的文件的热度有关系,特别是下载文件,如果很少人下载的文件确实速度比较慢,很多人访问的文件百度就会缓存起来,这样下载就会快很多;还有一般家庭宽带的上传速度都会比下载速度低很多。
你好,我的极1s刷pandorabox安装python版,无法启动,可能是什么原因呢?
你好,最好用ssh登陆路由,再执行命令看看出的什么错。
luci版的获取不到用户码。 ssh进去/usr/bin/syncy.py报错
File”/usr/bin/syncy.py”,line 30, in
import pycurl
ImportError:File not found
python-curl安装了吗?要是已经安装了,应该是安装的这个包有问题,重新找个这个包安装试试。
提示failed: SSL: certificate subject name (*.baidupcs.com) does not match target host name ‘d.pcs.baidu.com’.何解?
PCS quota is 2055G,used 351G.
2015-04-18 07:45:56 Start sync path: “/nfs/Public/baiduyun:/mycloud:sync”.
2015-04-18 07:45:57 Resuming download file “/apps/SyncY/mycloud/S04E04.mp4”.
2015-04-18 07:45:57 Resuming download file “/apps/SyncY/mycloud/S04E04.srt”.
2015-04-18 07:46:05 ERROR(Errno:51): Slice download file “/apps/SyncY/mycloud/S04E04.mp4” failed: SSL: certificate subject name (*.baidupcs.com) does not match target host name ‘d.pcs.baidu.com’.
2015-04-18 07:46:05 ERROR(Errno:51): Download file “/apps/SyncY/mycloud/S04E04.srt” failed: SSL: certificate subject name (*.baidupcs.com) does not match target host name ‘d.pcs.baidu.com’.
看这错误,应该是百度证书问题,或是偶发的证书验证问题,过个几个小时或一两天再看吧。
我也有相同的问题,快半个月了
Python是2.7版的吗?是半个月来有文件下载或上传成功过吗?也就是说是不是只有部分文件才报这个错误。
tp-link TL-WDR7500刷了这里的固件后(http://www.right.com.cn/forum/thread-146171-1-1.html)安装完syncy后获取不到授权码,运行syncy.py后显示:
/usr/bin$ /usr/bin/syncy.py
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 31, in
import pycurl
ImportError: File not found
按步骤安装syncy过程中发现,kmod-nls-utf8安装出错:
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-nls-utf8:
* kernel (= 3.10.49-1-0114c71ed85677c9c1e4911437af4743) *
* opkg_install_cmd: Cannot install package kmod-nls-utf8.
Multiple packages (kmod-nls-base and kmod-nls-base) providing same name marked HOLD or PREFER. Using latest.
求大神帮忙解决一下,多谢!
看日志,首先python-curl没安装或安装的有问题,这个是必须的。Kmod-nls-utf8是处理中文字符需要的,即使没有绑定应该是没问题的。
老板,试过全删重装也是这个问题,不知道哪里出错了,自己编译的wr703n 16m trunk/python2.7,sys路径/pycurl文件都检查过了
目前trunk版的没有相关的pycurl的支持,老版本安装上无法使用,前几天群里有个网友自己编译了个pycurl,说可以用,不知道是在什么版本上编译的。
你好,
2015-05-10 19:40:34 ERROR(Errno:51): Get device code failed: SSL: no alternative certificate subject name matches target host name ‘www.syncy.cn’.
运行syncy.py时报上面的错,我用ie尝试打开https://www.syncy.cn也是证书有问题,要怎么解决呢?
谢谢。
你好,你打开syncy.py文件,搜索curl.setopt(pycurl.SSL_VERIFYHOST, 2),把这个2修改成0试试看。
curl.setopt(pycurl.URL, url)
curl.setopt(pycurl.SSL_VERIFYPEER, 0)
curl.setopt(pycurl.SSL_VERIFYHOST, 0)
这个配置已经是0了,但是我这边还是报错
2016-06-16 08:43:33 ERROR(Errno:6): Get device code failed: Couldn’t resolve host ‘www.syncy.cn’.
,不过syncy.py这个文件我是放在U盘里面执行的,因为flash没有地方了。
你这是dns的问题,错误显示的是解析不了主机,不是ssl验证失败的问题。
请问一下,安装好后,同步时总是不成功,log中的记录是:
“ERROR(Errno:403):********failed: Returned by the server is not in the expected results.”
在本地硬盘上倒是能生成类似xxxx.syy的文件,但是不能真正的下载文件下来。
隔几个小时再重试下看看,403是服务器返回的错误码,但又没有错误信息,所以没法判断是什么问题。
作者有考虑开发成小米插件没?我赶脚会火 ^_^
曾经考虑过,但小米提供的sdk不完善,只能作罢。
树莓派2代B型,依赖已安装,开始运行同步均正常,刚刚出现问题如下
root@raspberrypi:/home/pi# /opt/bin/syncy.py
2015-06-16 16:00:17 INFO: Multi thread test success.
2015-06-16 16:00:18 INFO: PCS quota is 2056G,used 768G.
2015-06-16 16:00:18 INFO: Start sync path “/mnt/udisk/syncy:/apps/SyncY/raspi:download”.
2015-06-16 16:00:36 ERROR(Errno:404): Slice download file “/apps/SyncY/raspi/3DMGAME-Resident.Evil.Biohazard.HD.REMASTER.Cracked-3DM/3DMGAME-Resident.Evil.Biohazard.HD.REMASTER.Cracked-3DM.part03.rar” failed: Returned by the server is not in the expected results..
请问是被服务器封了么?
如果偶尔出现可以忽略了,要只是这一个文件一下载就报这个错就是被和谐了的。
pogoplug ,perl版能正常下载只是速率不快,http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/packages的源所需安装包完整。试着装python版,http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/packages的源缺少python-curl安装包,从别的地方找来后能正常安装完成,没有报错,但syncy总显示尚未启动,手动启动起来后,打开别的配置后再返回来就又显示尚未启动,状态不正常,整个重新安装还是如此。请问怎么办。
应该是有错误造成的,用ssh登录运行syncy.py看有什么错误信息。
请教作者,我的wndr4700安装成功
为什么会一直卡在
[WNDR4700]# python2.6 /opt/sync/syncy.py
2015-07-09 04:16:08 INFO: Multi thread test success.
2015-07-09 04:16:09 INFO: PCS quota is 5125G,used 730G.
2015-07-09 04:16:09 INFO: PCS quota is 5125G,used 730G.
这一步,不进行同步呢?
看日志是没有设置同步目录。
同是4700,已经生成激活码,并生成上传下载文件夹,账号也显示已绑定程序,但刷不出日志文件,网盘也出不了sync文件夹,请问怎么回事
上传几个文件看看,如果不能上传,记录下错误信息。或者先在百度的个人中心里解除绑定,然后再重新绑定看看。
python-curl 这个组件 在新版openwrt(chaos_calmer/15.05-rc1/rc2/rc3)已经找不到支持了, 即便强制安装了旧版也不是能用的. 能换个别的类似组件实现相关功能吗?
确实是新版的op上不支持pycurl,别的组件没有什么好用的。pycurl是开源的,如果自己会编译,重新针对新内核编译下应该是可以的,只是我不会搞编译op相关的东西,或者等一段时间可能就会有编译新版本出来了。
1505 和trunk 已经移除了pycurl
不知道是移除支持了,还是暂时pycurl没有编译出来,但换个组件也不是那么容易的。
这个直接交叉编译得到的pycurl 还是不能正常使用 估计是op的内核太新的问题
而且op trunk 的源码内直接没有pycurl模块 估计新架构直接移除了 而且从rc3来看 未来正式版很有可能也没用pycurl
建议楼主 直接用c写一版syncy吧 路由上也没用多开需求 能够一个个传就行了 另外就是现在有些设备只有cc支持 原来的bash版好像是不能用了
root@OpenWrt:/usr/bin# syncy.py
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 32, in
import pycurl
ImportError: File not found
装的是python-curl_7.19.0-1_ar71xx.ipk,获取用户码不行。
这个是按照的python-curl不能用,只有重新找个源实施,如果是trunk版的op,目前很难找到能用的python-curl。
你的图挂了
前几天好像有不少人用百度pcs存图的都有问题,好像这两天可以了。用免费的可靠性就是差些,可靠性要求高的最好用收费的。
在一台老的服务器上安装2.5.3版本,运行时出现以下提示:
root@# /usr/bin/syncy.py
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 2246, in
sy = SyncY(sys.argv[1:])
File “/usr/bin/syncy.py”, line 232, in __init__
responses = json.loads(responses)
File “/usr/local/lib/python2.7/json/__init__.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/local/lib/python2.7/json/decoder.py”, line 382, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting , delimiter: line 1 column 40 (char 39)
我用的依赖包的版本:
Python-2.7.10.tgz
python-support-1.0.15
pycurl-7.19.0.3
curl-7.44.0.tar.gz
问题有可能出在哪? 多谢!
这个是json解析出错,python能升级的话升级下看看,偶尔网络不好,接受到的json不完整也可能出现这个问题。
Python-2.7.10.tgz 是自编译安装的 之前在一台MyCloud上已经部署完毕,python相关包信息如下,syncy正常运行没问题:
python 2.7.3-4+deb7u1
python-minimal 2.7.3-4+deb7u1
python-pycurl 7.19.0-5
python-support 1.0.15
python2.7 2.7.3-6
python2.7-minimal 2.7.3-6
b)、执行syncy.py获取用户码 时显示:
/usr/bin/syncy.sh not found
怎么解决?
确定是说“/usr/bin/syncy.sh not found”?是的话那命令输入错误了,应该输入/usr/bin/syncy.py,而不能是/usr/bin/syncy.sh
最近好多都不能从百度同步回来了,我用这个只从云端下载不上传的,以前都好好的,最近发现很少有能正常正载的,换成百度云的客户端就没问题,不知道什么原因。
2015-10-02 05:02:41 INFO: Multi thread test success.
2015-10-02 05:02:41 INFO: PCS quota is 2055G,used 501G.
2015-10-02 05:02:41 INFO: Start sync path “/mnt/nas/SyncY:/apps/SyncY:download”.
2015-10-02 05:08:14 ERROR(Errno:56): Slice download file “/apps/SyncY/动画片/X游记之D圣归来.TC720P清晰国语中字.mp4” failed: .
2015-10-02 05:08:35 ERROR(Errno:56): Slice download file “/apps/SyncY/动画片/白雪公主之神秘爸爸.HD1280高清国语中字.mp4” failed: .
CURLE_RECV_ERROR (56)
Failure with receiving network data.
这个是curl官方对56错的解释,所以不知道是网络不好还是服务器的问题。
2015-10-10 15:56:54 ERROR(Errno:35): Get device code failed: ssl_handshake returned – PolarSSL: (-0x7280) SSL – The connection indicated an EOF.
openwrt 自己编译的 tp-703n 的 固件 1407官方源 的
这个是openssl的问题,不知道PolarSSL跟openssl是个什么关系。我没编译过固件,之前群里也有一网友有这个问题,后面不知道是怎么解决的,建议用openssl。
2015-10-10 16:22:13 ERROR(Errno:35): Get device code failed: ssl_handshake returned – PolarSSL: (-0x0050) NET – Connection was reset by peer.
现在是这个错误
253 py版 好像分片有个小问题 文件上传
文件主要是相机录制的视屏和拍的摘片 放到路由的外挂共享盘上 同步到百度云~ upload+
默认分片10M 发现很多大的照片会出现重复上传的问题
然后更改分片为100M 发现照片不会重复上传了 但是部分视频文件会重复上传。特别是大点的视屏
晚上回复更改下 不分片看是否会重复上传~
大文件不分片上传,可能会经常失败。造成重复上传的会有2种情况,一是本地文件的修改时间发生了变化,这个你观察下有没有变化;二是服务器端的md5码发生变化,这个咱们就无法控制了的,md5码都是百度返回的,之前我测试过大文件是没发现这个问题的,有空了我在测试下。
OpenWRT X86已经按照说明安装了
libcurl
libopenssl
kmod-nls-utf8
Python
python-curl
检查系统也发现python-curl已经安装了,也按说明修改了权限,但是执行syncy.py会出现如下的错误
root@Navigator:~# /usr/bin/syncy.py
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 32, in
import pycurl
ImportError: File not found
root@Navigator:~#
安装的python-curl有问题,有可能不是针对你的cpu或op的版本编译的,在找个看看。
和百度网盘授权关联完成了,设置自动启动时报了下面的错误:
# /etc/init.d/syncy enable
/bin/sh: can’t open ‘/etc/rc.common’
硬件是迅雷的赚钱宝
这个应该是你的设备不是标准的openwrt系统,系统的shell跟标准的版本不一样,你可以用ssh登录设备,然后进入/etc/init.d目录,打开一个别的文件,看看第一行是什么,然后把/etc/init.d/syncy文件的第一行参照的改下试试。
File “/usr/bin/syncy.py”, line 32, in
import pycurl
ImportError: File not found
15.05 用的python 2.7
python-curl版本没有问题。。。 估计是和新内核有关?
15.05上的python-curl需要自己编译,如果是AR7100系列的话,群里有已经编译好了的。
lz求一下编译好的15.05python-curl,我的是AR71XX系列,顺便可以加一下你的群吗
这个群里有人编译了,加群就可以。
kmod-nls-utf8在非open-wrt路由器上找不到安装包,例如梅林固件,希望作者能解决
不安装这个运行报什么错吗?如果没报错,测试下中文有没有问题,没问题就不用管了。
我openwrt上的python多数都提示illegal instruction,不知道怎么解决。
libopenssl和libcurl看有没有新版本,有的话升级下看看。
能不能给个 ubuntu安装教程
没有/etc/config 目录
在ubuntu上没有/etc/config可以建一个,或直接放在/etc目录下,然后把syncy.py文件开头的__CONFIG_FILE__改成’/etc/syncy’也可以
HI,是否还有单次上传功能呢,我记得很久以前有的。
有的,但只能上传一个文件,如果上传过程中出错也不会再自动上传了。
调用格式:syncy.py [local file path] [remote file path]
老大,早上下了个单文件的视频没问题。怎么下午下这个就一直报错呢?log 如下:
2016-01-03 15:11:24 INFO: Multi thread test success.
2016-01-03 15:11:25 INFO: PCS quota is 2059G,used 61G.
2016-01-03 15:11:25 INFO: Start sync path “/media/1/SyncY:/apps/SyncY/1:download”.
2016-01-03 15:11:25 INFO: Resuming download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4”.
2016-01-03 15:11:25 INFO: Resuming download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4”.
2016-01-03 15:11:55 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 8388608 bytes remaining to read.
2016-01-03 15:12:04 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 8126464 bytes remaining to read.
2016-01-03 15:12:07 ERROR(Errno:403): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: Returned by the server is not in the expected results..
2016-01-03 15:12:41 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 8650752 bytes remaining to read.
2016-01-03 15:12:43 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 8650752 bytes remaining to read.
2016-01-03 15:12:50 ERROR(Errno:403): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: Returned by the server is not in the expected results..
2016-01-03 15:12:51 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 10485760 bytes remaining to read.
2016-01-03 15:12:59 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 10485760 bytes remaining to read.
2016-01-03 15:13:03 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 10485760 bytes remaining to read.
2016-01-03 15:13:12 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 9961472 bytes remaining to read.
2016-01-03 15:13:12 ERROR: Download file “/apps/SyncY/1/小森林.夏秋篇.Little.Forest.Natsu.Aki.2014.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed.
2016-01-03 15:13:15 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 8650752 bytes remaining to read.
2016-01-03 15:13:28 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 9699328 bytes remaining to read.
2016-01-03 15:13:41 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 9961472 bytes remaining to read.
2016-01-03 15:13:50 ERROR(Errno:403): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: Returned by the server is not in the expected results..
2016-01-03 15:13:55 ERROR(Errno:403): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: Returned by the server is not in the expected results..
2016-01-03 15:14:00 ERROR(Errno:403): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: Returned by the server is not in the expected results..
2016-01-03 15:14:11 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 9437184 bytes remaining to read.
2016-01-03 15:14:13 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 9961472 bytes remaining to read.
2016-01-03 15:14:23 ERROR(Errno:403): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: Returned by the server is not in the expected results..
2016-01-03 15:14:26 ERROR(Errno:18): Slice download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: transfer closed with 9437184 bytes remaining to read.
2016-01-03 15:14:26 ERROR: Download file “/apps/SyncY/1/小森林.冬春篇.Little.Forest.Winter.Spring.2015.BD1080P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed.
2016-01-03 15:14:28 ERROR: Sync path “/media/1/SyncY:/apps/SyncY/1:download” failed, 0 files success, 2 files failed, 0 errors occurred.
2016-01-03 15:14:29 INFO: PCS quota is 2059G,used 61G.
应该是百度对这个文件有下载限制。
感谢老大回复。后面把长文件名改成短文件名了,还是一样报错。估计是服务器的问题了。
再次感谢开发这么好用的程序。
你好,不论是sync还是download+模式,都会不间断出现很多错误日志,我的是小度路由,潘多拉R2 14.09,错误日志如下:
2016-01-08 12:01:36 INFO: Multi thread test success.
2016-01-08 12:01:37 INFO: PCS quota is 2055G,used 606G.
2016-01-08 12:01:37 INFO: Start sync path “/mnt/sda2/SyncY:/apps/SyncY:download+”.
2016-01-08 12:13:21 ERROR(Errno:18): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: transfer closed with 3670016 bytes remaining to read.
2016-01-08 12:14:16 ERROR(Errno:403): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: Returned by the server is not in the expected results..
2016-01-08 12:15:14 ERROR(Errno:403): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: Returned by the server is not in the expected results..
2016-01-08 12:20:38 ERROR(Errno:18): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: transfer closed with 3407872 bytes remaining to read.
2016-01-08 12:21:01 ERROR(Errno:18): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: transfer closed with 3670016 bytes remaining to read.
2016-01-08 12:21:21 ERROR(Errno:403): Slice download file “/apps/SyncY/名侦探K南:业H的向日葵.修复版.Meitantei.Conan.Goka.no.himawari.2015.HD720P.X264.AAC.Japanese.CHS.Mp4Ba.mp4” failed: Returned by the server is not in the expected results..
2016-01-08 12:21:35 ERROR(Errno:18): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: transfer closed with 3436449 bytes remaining to read.
2016-01-08 12:21:48 ERROR(Errno:403): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: Returned by the server is not in the expected results..
2016-01-08 12:22:13 ERROR(Errno:403): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: Returned by the server is not in the expected results..
2016-01-08 12:22:44 ERROR(Errno:403): Slice download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed: Returned by the server is not in the expected results..
2016-01-08 12:22:48 ERROR: Download file “/apps/SyncY/枪之子.BD1280高清中英双字.mp4” failed.
你好,这个错误跟设定的同步模式没有关系,主要是百度服务器的问题,近几个月来很多人都有此问题,因此猜测是百度对下载大文件加了限制了,或者对于第三方接口调用下载的做了限制了。
请教:在luci设置界面里,开机自动启动,已打钩,接下来一项:启动…项,按钮总显示“启动”, SyncY尚未启动…….,点启动后,变为停止运行按钮,SyncY正在运行…….,但只要离开syncy luci设置界面就会回到显示“启动”, SyncY尚未启动…….,不知道什么原因?也不能和百度网盘同步,也没有错误提示。
上面您说是配置文件的问题,应该用英文的半角单引号,但是我确认了一下,确实是英文半角单引号,请问还有可能其他问题吗,谢谢
这个只能通过ssh登录路由,然后手动执行/usr/bin/syncy.py看看报什么错误了,如果能绑定就不会有什么大问题,可能是设置上的事情,如果绑定不了,估计是pycurl的问题,这个比较难搞,需要适用的pycurl才可以。
云端目录
必须为“/我的应用程序/SyncY”及其子目录
这句话里的“我的应用程序”是错误的,至少现在是错误的,百度云的是“我的应用数据”,就这么一点差错,让我搞了好几天。不断的新建 我的应用程序 目录,直到看了日志里:/apps/SyncY:download” 我想应该是搞错了。
云盘目录改为 /我的应用数据/syncy 一切正常。
你好,以前确实叫“我的应用程序”的,可能是百度之后该名字了,其实这个也只是一个现实名字,真正的文件目录是“/apps”,设置为“/apps/SyncY”也可以的。
我ROOT了迅雷赚钱宝。现已安装了samba和远程下载。想实现百度盘同步。但按照教程安装出错。是因为arm的过吗?
只要安装了你硬件适用的python和python-curl基本就不会有什么问题了,估计你那是安装的相应版本不对,这位网友(higsun@163.com),他说他就是在赚钱宝上安装的,我看日志,他是安装成功的,你可以咨询下他,或请他帮忙把他安装的包发你一份。
请教,在运行syncy.py进行授权并成功后,停在“2016-02-07 13:05:49 INFO: PCS quota is 2056G,used 1498G.”不动了。具体的日志
“2016-02-07 13:05:45 INFO: Multi thread test success.
2016-02-07 13:05:45 INFO: PCS quota is 2056G,used 1498G.
2016-02-07 13:05:45 INFO: Start sync path “/media/sda1/syncy_downloads:/apps/SyncY:upload”.
2016-02-07 13:05:46 INFO: Upload file “/media/sda1/syncy_downloads/syncy.log” completed.
2016-02-07 13:05:49 INFO: Sync path “/media/sda1/syncy_downloads:/apps/SyncY:upload” complete, Success sync 1 files.
2016-02-07 13:05:49 INFO: PCS quota is 2056G,used 1498G.
”
按下 ctrl+c,返回如下
“Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 2247, in
sy.start()
File “/usr/bin/syncy.py”, line 1560, in start
time.sleep(SyncY.config[‘syncinterval’])
KeyboardInterrupt
”
请问这个正常吗?还有我的硬件是赚钱宝,设置了开机自启,但是只有在ssh手动输入syncy.py才会同步,否则不会自动同步,这个正常吗?本人新手,希望老师讲细点,谢谢!春节快乐!
你好,你这是正常的,你这个应该是配置的目录里没文件,在第二个PCS quota is 2056G,used 1498G出现的时候,程序就进入设定的等待时间了。因第一次绑定时肯定不是在后台运行模式,所以只能手动终止了,之后你让程序以后台模式运行就可以了。
谢谢老师!
软件报错:
2016-03-01 18:52:24 ERROR: Exception error occurred on save task status(/mnt/sdb1/Download/15.rmvb).
[Errno 5] Input/output error .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 2198, in __save_status
os.fsync(dbnew.fileno())
OSError: [Errno 5] Input/output error
之前可以正常使用的,但重刷路由器固件(与之前的是同一版本的固件)后就这样了,卸载后重装还是这样
求解决,谢谢
问题已解决,是U盘的文件系统问题(无法写入)
PandoraBox貌似并没有打包python-curl 软件源里似乎也没有
咋办啊 大哥
只能自己编译了,我不会编译,会的话帮你们编译下。
提示‘获取用户码失败!’怎么办?
是pycurl包有问题的可能性最大,用putty登录进去收到运行看看报什么错误。
pycurl出问题无解了。。CC opkg不到pycurl。。
在迅雷下载宝上安装,手动启动,同步没有问题。但是设置为自动重启,在/etc/rc.d下已有S99syncy,但开机时无法自动启动。在rc.local里手动启动/etc/init.d/syncy start,也不能自动启动。请教下到底哪出了问题?
查看下启动脚本的权限,有没有运行权限。
你好,请教下entware下的安装问题支持的库除了kmod-nls-utf8全部安装好了。
但是由于entware是建立在opt目录下的所以调整了半天各种报错求大神指点迷津
我没用过entware,也不了解,之前到时有网友在optware上弄过,可以用。你把错误信息贴出来看看,kmod-nls-utf8没有安装应该运行是不会报错的,只是在中文文件名处理上可能有问题。
我海美迪的盒子,Q5四代,root后安装,安智路由最新版,然后再安装你这个,刚开始都正常,重启后出现错误
/usr/lib/lua/luci/dispatcher.lua:490: module ‘luci.controller.syncy’ not found:
no field package.preload[‘luci.controller.syncy’]
no file ‘./luci/controller/syncy.lua’
no file ‘/usr/share/lua/luci/controller/syncy.lua’
no file ‘/usr/share/lua/luci/controller/syncy/init.lua’
no file ‘/usr/lib/lua/luci/controller/syncy.lua’
no file ‘/usr/lib/lua/luci/controller/syncy/init.lua’
no file ‘./luci/controller/syncy.so’
no file ‘/usr/lib/lua/luci/controller/syncy.so’
no file ‘/usr/lib/lua/loadall.so’
no file ‘./luci.so’
no file ‘/usr/lib/lua/luci.so’
no file ‘/usr/lib/lua/loadall.so’
stack traceback:
[C]: in function ‘require’
/usr/lib/lua/luci/dispatcher.lua:490: in function ‘createindex’
/usr/lib/lua/luci/dispatcher.lua:517: in function ‘createtree’
/usr/lib/lua/luci/dispatcher.lua:201: in function ‘dispatch’
/usr/lib/lua/luci/dispatcher.lua:168: in function
求教啥问题啊,怎么解决啊,并且正常的时候也不能同步啊!
你这个感觉是相应文件没有真正写入到flash,在重启后这些文件就丢失了,如果是这样,建议不要用luci,从命令行配置,但这有个缺点就是修改配置文件不方便。
我的路由器安装python和syncy到U盘,在执行syncy.py时提示以下错误:
Traceback (most recent call last):
File “/mnt/sda1/usbipk/usr/bin/syncy.py”, line 32, in
import pycurl
ImportError: File not found
求教!
这个跟安装在U盘没有关系,是python-curl版本不对,不适用于你的cpu。
命令不会用,我是在Luci界面操作的,SyncY是别人做好的封装在bin里,直接给路由刷系统就有了
外挂U盘同步百度云,设置好以后保存出现如下代码,SyncY页打不开了,其他各项正常
/usr/lib/lua/luci/dispatcher.lua:448: Failed to execute cbi dispatcher target for entry ‘/admin/services/syncy’.
The called action terminated with an exception:
/usr/lib/lua/luci/cbi.lua:334: Unable to read UCI data: syncy
stack traceback:
[C]: in function ‘assert’
/usr/lib/lua/luci/dispatcher.lua:448: in function ‘dispatch’
/usr/lib/lua/luci/dispatcher.lua:195: in function
这个最好问问你刷的固件的制作者,这些都是luci报出来的。另外看看路由的系统存储的位置是否慢了,因为我发现如果空间满了也会出现类似的错误,但如果满了,打开其他的页面也会出错。
[root@PandoraBox:/root]#/etc/init.d/syncy restart2016-11-02 00:20:58 INFO: PCS quota is 2056G,used 193G.
2016-11-02 00:20:58 INFO: Start sync path “/mnt/sda2/SyncY:/apps/SyncY:sync”.
\\2016-11-02 00:20:59 ERROR: Transfer task exception error occurred: ‘utf8’ codec can’t decode byte 0xb1 in position 85: invalid start byte .
Traceback (most recent call last):
File “/usr/bin/syncy.py”, line 1778, in run
ret = self.__rapid_uploadfile()
File “/usr/bin/syncy.py”, line 1901, in __rapid_uploadfile
printlog(‘%s ERROR(Errno:%d): Rapid upload file “%s” failed: %s.’ % (time.strftime(“%Y-%m-%d %H:%M:%S”, time.localtime()), retcode, self.__filepath, responses[‘error_msg’]))
File “/usr/lib/python2.7/encodings/utf_8.py”, line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xb1 in position 85: invalid start byte
2016-11-02 00:21:02 ERROR: Sync path “/mnt/sda2/SyncY:/apps/SyncY:sync” failed, 0 files success, 1 files failed, 0 errors occurred.
2016-11-02 00:21:03 INFO: PCS quota is 2056G,used 193G.
帮忙看下什么原因
获取不到验证码..日志如下
[root@PandoraBox:/usr/bin]#/usr/bin/syncy.py
2016-11-14 02:14:42 ERROR(Errno:35): Get device code failed: ssl_handshake returned – PolarSSL: (-0x4100) RSA – Input data contains invalid padding and is rejected.
求帮忙解决!谢谢
请问 群晖arm版的可以安装吗?如果能运行的话,可以给个教程吗