Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

企业版登录的时候报错 KeyError: 'value' #63

Open
cool-sun opened this issue Dec 20, 2019 · 10 comments
Open

企业版登录的时候报错 KeyError: 'value' #63

cool-sun opened this issue Dec 20, 2019 · 10 comments

Comments

@cool-sun
Copy link

cool-sun commented Dec 20, 2019

Traceback (most recent call last):
  File "/usr/local/bin/onedrivecmd", line 11, in <module>
    load_entry_point('OnedriveCMD==0.1.8.1', 'console_scripts', 'onedrivecmd')()
  File "/usr/local/lib/python3.6/dist-packages/OnedriveCMD-0.1.8.1-py3.6.egg/onedrivecmd/onedrivecmd.py", line 47, in main
  File "/usr/local/lib/python3.6/dist-packages/OnedriveCMD-0.1.8.1-py3.6.egg/onedrivecmd/utils/actions.py", line 149, in do_init
  File "/usr/local/lib/python3.6/dist-packages/OnedriveCMD-0.1.8.1-py3.6.egg/onedrivecmd/utils/actions.py", line 87, in init_business
  File "/usr/local/lib/python3.6/dist-packages/onedrivesdk/helpers/resource_discovery.py", line 26, in get_service_info
    service_info_list = [ServiceInfo(x) for x in response['value']]
KeyError: 'value'
@cool-sun cool-sun changed the title od.cnbeining.com域名访问不了 企业版登录的时候报错 KeyError: 'value' Dec 23, 2019
@aplot249
Copy link

请问你解决了吗?我也是这个问题,od.cnbeining.com访问不了

@cool-sun
Copy link
Author

@qq1788lover KeyError: 'value'这个问题没解决,但是od.cnbeining.com访问不了没关系,你手动粘贴浏览器地址栏中的code值就行

@cnbeining
Copy link
Owner

cnbeining commented Dec 26, 2019 via email

@cool-sun
Copy link
Author

@cnbeining 请问下述错误是什么原因啊
Traceback (most recent call last):
File "/usr/local/bin/onedrivecmd", line 11, in
load_entry_point('OnedriveCMD==0.1.8.1', 'console_scripts', 'onedrivecmd')()
File "/usr/local/lib/python3.6/dist-packages/OnedriveCMD-0.1.8.1-py3.6.egg/onedrivecmd/onedrivecmd.py", line 47, in main
File "/usr/local/lib/python3.6/dist-packages/OnedriveCMD-0.1.8.1-py3.6.egg/onedrivecmd/utils/actions.py", line 149, in do_init
File "/usr/local/lib/python3.6/dist-packages/OnedriveCMD-0.1.8.1-py3.6.egg/onedrivecmd/utils/actions.py", line 87, in init_business
File "/usr/local/lib/python3.6/dist-packages/onedrivesdk/helpers/resource_discovery.py", line 26, in get_service_info
service_info_list = [ServiceInfo(x) for x in response['value']]
KeyError: 'value'

@gaorizhong
Copy link

Today, we are announcing that on November 1st, 2018, we will stop supporting Basic Authentication in Outlook REST API v1.0. Additionally, starting on November 1st, 2019, we will decommission the Outlook REST API v1.0 in favor of Microsoft Graph and Outlook REST API v2.0. This means that new or existing apps will not be able to use Basic Authentication in Outlook REST API v1.0 starting November 1st, 2018 and will not be able to use Outlook REST API v1.0 at all starting November 1st, 2019.

If you have been using the Outlook REST v1.0 API in your app, you should plan on transitioning to Microsoft Graph-based Outlook REST APIs to continue accessing Exchange Online data. For more information and details on how to make the transition, please refer to the following articles:

Getting started with Microsoft Graph using OAuth2
Transitioning from Outlook v1.0 to Microsoft Graph

https://developer.microsoft.com/en-us/office/blogs/outlook-rest-api-v1-0-office-365-discovery-and-live-connect-api-deprecation/

@ODtian
Copy link

ODtian commented Jan 18, 2020

Traceback (most recent call last):
File "onedrivecmd.py", line 96, in
main()
File "onedrivecmd.py", line 47, in main
client = do_init(client, args)
File "/content/onedrivecmd/utils/actions.py", line 149, in do_init
client = init_business(client)
File "/content/onedrivecmd/utils/actions.py", line 87, in init_business
service_info = ResourceDiscoveryRequest().get_service_info(auth.access_token)[0]
File "/usr/local/lib/python3.6/dist-packages/onedrivesdk/helpers/resource_discovery.py", line 26, in get_service_info
service_info_list = [ServiceInfo(x) for x in response['value']]
KeyError: 'value'

还是报错

@gaorizhong
Copy link

这个是由于巨硬强制淘汰了旧的认证 而onedrivecmd用的还是一代 解决方法是自己修改认证方式为2.0的 或者去找提供了2.0验证的来用
tips: 搜”login.microsoftonline.com/common/oauth2/v2.0“

@ODtian
Copy link

ODtian commented Jan 19, 2020

我稍微改了一下,用的是o365,添加账户和上传已经做好了,过几天把其他功能做好发出来

@cool-sun
Copy link
Author

@ODtian 请把获取直链的功能也改一下吧,谢谢😊

@ODtian
Copy link

ODtian commented Jan 22, 2020

@ODtian 请把获取直链的功能也改一下吧,谢谢😊

看我的项目,已经可以使用了,上传做了多线程,随便改了改,只简单测试了下,应该会有很多问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants