Git Product home page Git Product logo

Comments (26)

houtianze avatar houtianze commented on July 26, 2024

会不会是 http://bypyoauth.appspot.com/ 被墙了?
试试用浏览器能不能访问:http://bypyoauth.appspot.com/273ed5ce9831b6dd6fd33265edfc1570
如果不能,可能是被墙了。

from bypy.

chaopeng avatar chaopeng commented on July 26, 2024

墙了。。。

from bypy.

chaopeng avatar chaopeng commented on July 26, 2024

翻墙拿了授权 上传报错

/bypy.py syncup /home/**/yun / -d
Token file: '/home/**/.bypy.json'
Hash Cache file: '/home/**/.bypy.pickle'
App root path at Baidu Yun '/apps/bypy'
sys.stdin.encoding = UTF-8
sys.stdout.encoding = UTF-8
----

<D> Token loaded:
<D> {u'access_token': u'21.17**************************92000.1396079324.4111405634-1572671', u'expires_in': 2592000, u'session_secret': u'c7aa*************88f4621f417b4', u'scope': u'basic netdisk', u'session_key': u'9mnRda6C**********************************Tg==', u'refresh_token': u'2*******************************************572671'}
<D> [16:03:02] Cache hit for file '/home/***/yun/1.txt',
md5: dd75ed975639f27bca44b3ad129552bc
size: 13
mtime: 1393487877
<D> F - 1.txt - size: 13 - md5: dd75ed975639f27bca44b3ad129552bc 

<D> GET https://pcs.baidu.com/rest/2.0/pcs/file
<D> actargs: ([], [])
<D> Params: {u'path': u'/apps/bypy', u'order': u'asc', u'method': u'list', u'by': u'name'}
<D> HTTP Status Code: 200
<D> Request OK, processing action
<D> Request all goes fine
<D> Remote dirs: []
<D> Remote files: []
<D> ---- Remote Dir Contents ---
<D> 
<D> '/home/**/yun/1.txt' is small and being non-slicing uploaded.
<D> POST https://c.pcs.baidu.com/rest/2.0/pcs/file
<D> actargs: /apps/bypy/1.txt
<D> Params: {u'path': u'/apps/bypy/1.txt', u'ondup': u'overwrite', u'method': u'upload'}
<E> [16:03:07] Error accessing 'https://c.pcs.baidu.com/rest/2.0/pcs/file'
<E> [16:03:07] Exception: [Errno 1] _ssl.c:509: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Traceback (most recent call last):
  File "./bypy.py", line 804, in __request_work
    params = parsnew, timeout = self.__timeout, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 88, in post
    return request('post', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 335, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 438, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 331, in send
    raise SSLError(e)
SSLError: [Errno 1] _ssl.c:509: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

from bypy.

houtianze avatar houtianze commented on July 26, 2024

贴下你的uname -a输出?

from bypy.

chaopeng avatar chaopeng commented on July 26, 2024

Linux ***-note 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

from bypy.

houtianze avatar houtianze commented on July 26, 2024

哦,大概猜到了。
你还在翻墙(GoAgent?)状态跑吧?一旦拿到授权(得到~/.bypy.json),你就不用翻墙跑了。试试退出翻墙状态再跑?
如果是用GoAgent,问题应该出在他那个证书不是被信任的。

from bypy.

houtianze avatar houtianze commented on July 26, 2024

如果还不行,按照这个问答:
https://stackoverflow.com/questions/17084886/ssl-error-routinesssl3-get-server-certificatecertificate-verify-failed

你搜索request.get和requests.post函数调用,在参数里面加上verify=False应该可以解决这个问题吧。

暂时不想改动是因为百度的证书是没问题的。

from bypy.

chaopeng avatar chaopeng commented on July 26, 2024

goagent是关掉了,改verify=False可以,但是总觉得有点不科学。。。

from bypy.

houtianze avatar houtianze commented on July 26, 2024

是啊,我也觉得不科学,这个问题我从来没遇见过。你试下用浏览器直接访问:https://c.pcs.baidu.com/rest/2.0/pcs/file
会有证书警告吗?

from bypy.

chaopeng avatar chaopeng commented on July 26, 2024

没有警告

from bypy.

heimi avatar heimi commented on July 26, 2024

这个东西可以放在国内吗?

from bypy.

houtianze avatar houtianze commented on July 26, 2024

可以考虑,国内哪个好一些?sae, bae?
访问量不大,一个访问就一两个HTTP 请求,免费的账号够用不?谁有经验?

墙有点深井,我在两个地方试过可以的,但貌似很多地方还是不行。。

from bypy.

heimi avatar heimi commented on July 26, 2024

嗯, sae免费的绝对够用

from bypy.

houtianze avatar houtianze commented on July 26, 2024

@heimi 这样啊,好的,我去看看。
谢谢推荐。

from bypy.

heimi avatar heimi commented on July 26, 2024

开通PCS API权限难审核吗?

from bypy.

houtianze avatar houtianze commented on July 26, 2024

当初根本不用审核,直接网页点两下就可以了。现在好像百度暂时不给申请了,说是调整中。

from bypy.

huangchanghu avatar huangchanghu commented on July 26, 2024

能快点迁个地方吗?不能用啊,翻墙了还是不成功

from bypy.

houtianze avatar houtianze commented on July 26, 2024

好吧,我尽量快点迁移了,现在还刚刚开始熟悉bae的环境。好像openshift.com也可以考虑,谁知道在上面搭建的网站墙了没?
翻了墙还不能用?能贴下bypy.py -d -v quota的输出吗?

from bypy.

huangchanghu avatar huangchanghu commented on July 26, 2024

@houtianze 现在翻墙后可以了,是我的vpn的问题
另外发现下载文件有点问题:

  • 文件下载是先保存在内存下完再存到文件?发现下载时内存占用不断上涨,且文件没有保存到磁盘上
  • 另外,加-v 没有显示下载进度

from bypy.

houtianze avatar houtianze commented on July 26, 2024

@huangchanghu

  • 是先到内存,但应该不会占用很多,缺省是10M一存,内纯用量超过很多吗?不过我主要上传了,没怎么测试大文件下载。
  • 单个文件下载现在是没有进度的,不过下载一个目录,加-v应该会显示下载的文件。

from bypy.

huangchanghu avatar huangchanghu commented on July 26, 2024

我测的是下载一个视频文件,我强制停止的时候内存占用500多兆了

houtianze [email protected]编写:

@huangchanghu

是先到内存,但应该不会占用很多,缺省是10M一存,内纯用量超过很多吗?不过我主要上传了,没怎么测试大文件下载。单个文件下载现在是没有进度的,不过下载一个目录,加-v应该会显示下载的文件。


Reply to this email directly or view it on GitHub.

from bypy.

houtianze avatar houtianze commented on July 26, 2024

这样的啊,看来是个大bug,我去看看。

from bypy.

houtianze avatar houtianze commented on July 26, 2024

@huangchanghu 下载狂吃内存的bug应该解决了。调试输出代码造成。。

from bypy.

huangchanghu avatar huangchanghu commented on July 26, 2024

@houtianze 试了,ok了。很赞~~加油哈,希望后续更完善些。比如可以借鉴借鉴迅雷离线的这个项目:iambus / xunlei-lixian

from bypy.

houtianze avatar houtianze commented on July 26, 2024

好的,谢谢鼓励:)
准备把授权部分搬移到不被墙的服务器上去。

from bypy.

houtianze avatar houtianze commented on July 26, 2024

加了一个现在貌似还未被墙的服务器,暂时墙内应该可以用了。

from bypy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.