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]版本号检查逻辑错误 #110

Closed
Johnserf-Seed opened this issue Jun 28, 2024 · 8 comments
Closed

[BUG]版本号检查逻辑错误 #110

Johnserf-Seed opened this issue Jun 28, 2024 · 8 comments
Labels
故障(bug) 代码问题导致的错误(Bugs caused by code problems) 已确认(confirmed) 该issue已被处理,将在下次推送中更新(The issue has been processed and will be updated in the next push)

Comments

@Johnserf-Seed
Copy link
Owner

非常粗心的问题,测试逻辑忘记在发布时纠正了 :<
image

@Johnserf-Seed Johnserf-Seed added 故障(bug) 代码问题导致的错误(Bugs caused by code problems) 已确认(confirmed) 该issue已被处理,将在下次推送中更新(The issue has been processed and will be updated in the next push) labels Jun 28, 2024
@cor961
Copy link

cor961 commented Jul 2, 2024

请问如何修正呢?现在都报这个错误和AttributeError: 'str' object has no attribute 'get'。

@Johnserf-Seed
Copy link
Owner Author

请问如何修正呢?现在都报这个错误和AttributeError: 'str' object has no attribute 'get'。

  1. 修改f2/cli/cli_command.pycheck_version方法即可,将第一个判断的条件更改为 f2.__version__ > latest_version即可

  2. AttributeError: 'str' object has no attribute 'get' 这个错误有更详细的日志吗?

@cor961
Copy link

cor961 commented Jul 2, 2024

Traceback (most recent call last):
File "/bin/f2", line 8, in
sys.exit(main())
^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/f2/apps/douyin/cli.py", line 441, in douyin
ctx.invoke(set_cli_config, **kwargs)
File "/volume1/@appstore/python311/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/f2/cli/cli_commands.py", line 182, in set_cli_config
asyncio.run(run_app(kwargs))
File "/volume1/@appstore/python311/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/site-packages/f2/cli/cli_commands.py", line 189, in run_app
app_module = importlib.import_module(f"f2.apps.{app_name}.handler")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume1/@appstore/python311/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/volume1/@appstore/python311/lib/python3.11/site-packages/f2/apps/douyin/handler.py", line 13, in
from f2.apps.douyin.crawler import DouyinCrawler, DouyinWebSocketCrawler
File "/volume1/@appstore/python311/lib/python3.11/site-packages/f2/apps/douyin/crawler.py", line 13, in
from f2.apps.douyin.model import (
File "/volume1/@appstore/python311/lib/python3.11/site-packages/f2/apps/douyin/model.py", line 11, in
class BaseRequestModel(BaseModel):
File "/volume1/@appstore/python311/lib/python3.11/site-packages/f2/apps/douyin/model.py", line 28, in BaseRequestModel
os_name: str = ClientConfManager.brm_os().get("name", "Windows")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'

@cor961
Copy link

cor961 commented Jul 2, 2024

更新到0.0.1.6才出现的。

@cor961
Copy link

cor961 commented Jul 4, 2024

请问如何修正呢?现在都报这个错误和AttributeError: 'str' object has no attribute 'get'。

  1. 修改f2/cli/cli_command.pycheck_version方法即可,将第一个判断的条件更改为 f2.__version__ > latest_version即可
  2. AttributeError: 'str' object has no attribute 'get' 这个错误有更详细的日志吗?

错误日志已发在上面。

@Johnserf-Seed
Copy link
Owner Author

请问如何修正呢?现在都报这个错误和AttributeError: 'str' object has no attribute 'get'。

  1. 修改f2/cli/cli_command.pycheck_version方法即可,将第一个判断的条件更改为 f2.__version__ > latest_version即可
  2. AttributeError: 'str' object has no attribute 'get' 这个错误有更详细的日志吗?

错误日志已发在上面。

请检查f2/conf/conf.yaml文件中的douyin配置是否包含以下蓝框的内容,注意配置文件的缩进
image

@cor961
Copy link

cor961 commented Jul 5, 2024

请问如何修正呢?现在都报这个错误和AttributeError: 'str' object has no attribute 'get'。

  1. 修改f2/cli/cli_command.pycheck_version方法即可,将第一个判断的条件更改为 f2.__version__ > latest_version即可
  2. AttributeError: 'str' object has no attribute 'get' 这个错误有更详细的日志吗?

错误日志已发在上面。

请检查f2/conf/conf.yaml文件中的douyin配置是否包含以下蓝框的内容,注意配置文件的缩进 image

我看了,文件路径“/volume1/@appstore/python311/lib/python3.11/site-packages/f2/conf/conf.yaml”,包含了蓝色框的部分,我看文件时间是7-2,应该是更新到0.0.1.6的时候自动更新的,这个文件我没有编辑过。

@cor961
Copy link

cor961 commented Jul 5, 2024

请问如何修正呢?现在都报这个错误和AttributeError: 'str' object has no attribute 'get'。

  1. 修改f2/cli/cli_command.pycheck_version方法即可,将第一个判断的条件更改为 f2.__version__ > latest_version即可
  2. AttributeError: 'str' object has no attribute 'get' 这个错误有更详细的日志吗?

错误日志已发在上面。

请检查f2/conf/conf.yaml文件中的douyin配置是否包含以下蓝框的内容,注意配置文件的缩进 image

哦,我知道原因了,为了方便编辑,我的app.yaml是在“/volume1/homes/admin/Tools/f2/conf/”这个路径下,这个文件夹里面有个以前旧版本的conf.yaml,我把它替换为“/volume1/@appstore/python311/lib/python3.11/site-packages/f2/conf/”路径下0.01.6版本的conf.yaml,下载就正常了。

conf.yaml是默认使用和app.yaml相同路径下的文件?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
故障(bug) 代码问题导致的错误(Bugs caused by code problems) 已确认(confirmed) 该issue已被处理,将在下次推送中更新(The issue has been processed and will be updated in the next push)
Projects
None yet
Development

No branches or pull requests

2 participants