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

[Bug] 你好配置完成后提示 社区cookie获取失败是什么意思 #163

Open
4 tasks done
972513547 opened this issue Nov 16, 2023 · 9 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@972513547
Copy link

Verify Steps

  • Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • Latest 我已经使用最新版本测试过,问题依旧存在
  • Code 这是 MIUITask 自身代码存在的问题,并非我所使用的 网络 或 设备 等特定问题
  • Meaningful 我提交的不是无意义的 催促更新或修复 请求

MIUITask Version

v1.6.0.1

Bug Found in Environment

Docker

Bug Found in Python Version

3.7

Describe the Bug

login.login:78 - 小米账号登录成功
login.get_cookie:102 - 社区获取 Cookie 失败
Traceback (most recent call last):

File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 66, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
│ │ │ └ <Request [b'GET']>
│ │ └ <function AsyncConnectionPool.handle_async_request at 0x7fc82bdc9b40>
│ └ <httpcore.AsyncConnectionPool object at 0x7fc82bb58700>
└ <httpx.AsyncHTTPTransport object at 0x7fc82ab002b0>
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 215, in handle_async_request
raise UnsupportedProtocol(
└ <class 'httpcore.UnsupportedProtocol'>

httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/miuitask.py", line 42, in
asyncio.run(main())
│ │ └ <function main at 0x7fc82e48acb0>
│ └ <function run at 0x7fc82e48b370>
└ <module 'asyncio' from '/usr/local/lib/python3.10/asyncio/init.py'>

File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
│ │ └ <coroutine object main at 0x7fc82aa3e0a0>
│ └ <function BaseEventLoop.run_until_complete at 0x7fc82d89c550>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x7fc82d89c4c0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x7fc82d89dfc0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
handle._run()
│ └ <function Handle._run at 0x7fc82da6d990>
└ <Handle <TaskStepMethWrapper object at 0x7fc82ab00760>()>
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle <TaskStepMethWrapper object at 0x7fc82ab00760>()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle <TaskStepMethWrapper object at 0x7fc82ab00760>()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle <TaskStepMethWrapper object at 0x7fc82ab00760>()>

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/miuitask.py", line 21, in main
if (cookies := await login_obj.login()):
│ └ <function Login.login at 0x7fc82b3ed1b0>
└ <utils.api.login.Login object at 0x7fc82aa62a70>

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/utils/api/login.py", line 79, in login
cookies = await self.get_cookie(api_data.location)
│ │ │ └ ''
│ │ └ LoginResultHandler(content={'notificationUrl': 'https://account.xiaomi.com/identity/authStart?sid=miui_vip&context=6taocWtEwn...
│ └ <function Login.get_cookie at 0x7fc82b3ed240>
└ <utils.api.login.Login object at 0x7fc82aa62a70>

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/utils/api/login.py", line 98, in get_cookie
response = await get(url, follow_redirects=False)
│ └ ''
└ <function get at 0x7fc82bb2f760>

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/utils/request.py", line 36, in get
return await client.get(url,
│ │ └ ''
│ └ <function AsyncClient.get at 0x7fc82bde3c70>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>

File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1757, in get
return await self.request(
│ └ <function AsyncClient.request at 0x7fc82bde3880>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1530, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
│ │ │ │ └ False
│ │ │ └ <httpx._client.UseClientDefault object at 0x7fc82c108fa0>
│ │ └ <Request('GET', '/')>
│ └ <function AsyncClient.send at 0x7fc82bde3a30>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1617, in send
response = await self._send_handling_auth(
│ └ <function AsyncClient._send_handling_auth at 0x7fc82bde3ac0>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
│ └ <function AsyncClient._send_handling_redirects at 0x7fc82bde3b50>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
│ │ └ <Request('GET', '/')>
│ └ <function AsyncClient._send_single_request at 0x7fc82bde3be0>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
│ │ └ <Request('GET', '/')>
│ └ <function AsyncHTTPTransport.handle_async_request at 0x7fc82bde1090>
└ <httpx.AsyncHTTPTransport object at 0x7fc82ab002b0>
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 365, in handle_async_request
with map_httpcore_exceptions():
└ <function map_httpcore_exceptions at 0x7fc82b7931c0>
File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
│ │ │ │ │ └ <traceback object at 0x7fc82aadb080>
│ │ │ │ └ UnsupportedProtocol("Request URL is missing an 'http://' or 'https://' protocol.")
│ │ │ └ <class 'httpcore.UnsupportedProtocol'>
│ │ └ <method 'throw' of 'generator' objects>
│ └ <generator object map_httpcore_exceptions at 0x7fc82aaa4040>
└ <contextlib._GeneratorContextManager object at 0x7fc82ab006d0>
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 83, in map_httpcore_exceptions
raise mapped_exc(message) from exc
│ └ "Request URL is missing an 'http://' or 'https://' protocol."
└ <class 'httpx.UnsupportedProtocol'>

httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.
/usr/local/lib/python3.10/site-packages/pydantic/main.py:308: UserWarning: Pydantic serializer warnings:
Expected Union[dict[any, any], str] but got bool - serialized value may not be as expected
return self.pydantic_serializer.to_python(
request.notify_me:75 - 未配置推送或未正确配置推送

MIUITask Log

login.login:78 - 小米账号登录成功
login.get_cookie:102 - 社区获取 Cookie 失败
Traceback (most recent call last):

File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 66, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
│ │ │ └ <Request [b'GET']>
│ │ └ <function AsyncConnectionPool.handle_async_request at 0x7fc82bdc9b40>
│ └ <httpcore.AsyncConnectionPool object at 0x7fc82bb58700>
└ <httpx.AsyncHTTPTransport object at 0x7fc82ab002b0>
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 215, in handle_async_request
raise UnsupportedProtocol(
└ <class 'httpcore.UnsupportedProtocol'>

httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/miuitask.py", line 42, in
asyncio.run(main())
│ │ └ <function main at 0x7fc82e48acb0>
│ └ <function run at 0x7fc82e48b370>
└ <module 'asyncio' from '/usr/local/lib/python3.10/asyncio/init.py'>

File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
│ │ └ <coroutine object main at 0x7fc82aa3e0a0>
│ └ <function BaseEventLoop.run_until_complete at 0x7fc82d89c550>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x7fc82d89c4c0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x7fc82d89dfc0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
handle._run()
│ └ <function Handle._run at 0x7fc82da6d990>
└ <Handle <TaskStepMethWrapper object at 0x7fc82ab00760>()>
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle <TaskStepMethWrapper object at 0x7fc82ab00760>()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle <TaskStepMethWrapper object at 0x7fc82ab00760>()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle <TaskStepMethWrapper object at 0x7fc82ab00760>()>

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/miuitask.py", line 21, in main
if (cookies := await login_obj.login()):
│ └ <function Login.login at 0x7fc82b3ed1b0>
└ <utils.api.login.Login object at 0x7fc82aa62a70>

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/utils/api/login.py", line 79, in login
cookies = await self.get_cookie(api_data.location)
│ │ │ └ ''
│ │ └ LoginResultHandler(content={'notificationUrl': 'https://account.xiaomi.com/identity/authStart?sid=miui_vip&context=6taocWtEwn...
│ └ <function Login.get_cookie at 0x7fc82b3ed240>
└ <utils.api.login.Login object at 0x7fc82aa62a70>

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/utils/api/login.py", line 98, in get_cookie
response = await get(url, follow_redirects=False)
│ └ ''
└ <function get at 0x7fc82bb2f760>

File "/ql/data/scripts/0-8-4_miui-auto-tasks_master/utils/request.py", line 36, in get
return await client.get(url,
│ │ └ ''
│ └ <function AsyncClient.get at 0x7fc82bde3c70>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>

File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1757, in get
return await self.request(
│ └ <function AsyncClient.request at 0x7fc82bde3880>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1530, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
│ │ │ │ └ False
│ │ │ └ <httpx._client.UseClientDefault object at 0x7fc82c108fa0>
│ │ └ <Request('GET', '/')>
│ └ <function AsyncClient.send at 0x7fc82bde3a30>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1617, in send
response = await self._send_handling_auth(
│ └ <function AsyncClient._send_handling_auth at 0x7fc82bde3ac0>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
│ └ <function AsyncClient._send_handling_redirects at 0x7fc82bde3b50>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
│ │ └ <Request('GET', '/')>
│ └ <function AsyncClient._send_single_request at 0x7fc82bde3be0>
└ <httpx.AsyncClient object at 0x7fc82aa61ff0>
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
│ │ └ <Request('GET', '/')>
│ └ <function AsyncHTTPTransport.handle_async_request at 0x7fc82bde1090>
└ <httpx.AsyncHTTPTransport object at 0x7fc82ab002b0>
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 365, in handle_async_request
with map_httpcore_exceptions():
└ <function map_httpcore_exceptions at 0x7fc82b7931c0>
File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
│ │ │ │ │ └ <traceback object at 0x7fc82aadb080>
│ │ │ │ └ UnsupportedProtocol("Request URL is missing an 'http://' or 'https://' protocol.")
│ │ │ └ <class 'httpcore.UnsupportedProtocol'>
│ │ └ <method 'throw' of 'generator' objects>
│ └ <generator object map_httpcore_exceptions at 0x7fc82aaa4040>
└ <contextlib._GeneratorContextManager object at 0x7fc82ab006d0>
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 83, in map_httpcore_exceptions
raise mapped_exc(message) from exc
│ └ "Request URL is missing an 'http://' or 'https://' protocol."
└ <class 'httpx.UnsupportedProtocol'>

httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.
/usr/local/lib/python3.10/site-packages/pydantic/main.py:308: UserWarning: Pydantic serializer warnings:
Expected Union[dict[any, any], str] but got bool - serialized value may not be as expected
return self.pydantic_serializer.to_python(
request.notify_me:75 - 未配置推送或未正确配置推送

MIUITask Config

No response

Screenshots

No response

@972513547 972513547 added the bug Something isn't working label Nov 16, 2023
@Night-stars-1
Copy link
Collaborator

登录遇到了验证码

@0-8-4
Copy link
Owner

0-8-4 commented Nov 16, 2023 via email

@972513547
Copy link
Author

你需要自行接入支持的 大妈平台

On Thu, 16 Nov 2023 at 18:14, Night-stars-1 @.> wrote: 登录遇到了验证码 — Reply to this email directly, view it on GitHub <#163 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOUFWL6PLNWI5W47BPK6SDYEW4NHAVCNFSM6AAAAAA7NQPBTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJTHEYDGMJVGY . You are receiving this because you are subscribed to this thread.Message ID: @.>

请问有什么大码平台吗

@972513547
Copy link
Author

请问如何接入大码平台

@603185423
Copy link

这个是需要手机短信验证的报错

@Heanyix
Copy link

Heanyix commented Nov 18, 2023

我也是同样的问题

@Night-stars-1
Copy link
Collaborator

我也是同样的问题

直接使用cookies登录

@Heanyix
Copy link

Heanyix commented Nov 18, 2023

cookies登好的我试试,

@zixijian
Copy link

没发现报url链接也是一个错误么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants