onedrivecmd icon indicating copy to clipboard operation
onedrivecmd copied to clipboard

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

Open cool-sun opened this issue 6 years ago • 10 comments

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 avatar Dec 20 '19 09:12 cool-sun

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

aplot249 avatar Dec 24 '19 19:12 aplot249

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

cool-sun avatar Dec 26 '19 09:12 cool-sun

Issue fixed.

在 2019年12月26日,上午4:46,卟想苌 [email protected] 写道:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cnbeining/onedrivecmd/issues/63?email_source=notifications&email_token=AAL5DATPBDQBKBOI2TMIH3TQ2R4Q7A5CNFSM4J53N5GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHVKMLA#issuecomment-569026092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL5DAR3EYYQNKEXYMTEQU3Q2R4Q7ANCNFSM4J53N5GA.

cnbeining avatar Dec 26 '19 16:12 cnbeining

@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'

cool-sun avatar Dec 29 '19 05:12 cool-sun

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/

gaorizhong avatar Jan 08 '20 17:01 gaorizhong

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'

还是报错

ODtian avatar Jan 18 '20 14:01 ODtian

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

gaorizhong avatar Jan 18 '20 16:01 gaorizhong

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

ODtian avatar Jan 19 '20 14:01 ODtian

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

cool-sun avatar Jan 20 '20 03:01 cool-sun

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

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

ODtian avatar Jan 22 '20 17:01 ODtian