Advertisement
yehchge

PyPtt get_post 失敗

Jun 10th, 2025
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.11 KB | Software | 0 0
  1. PyPtt get_post 失敗
  2.  
  3. 不知道為何執行程式顯示錯誤的版本是 1.2.14
  4. 使用 pip show PyPtt 查詢版本時是 1.2.17
  5.  
  6. Array
  7. (
  8.     [0] => [06.10 15:09:09][PyPtt][INFO] PyPtt v 1.2.14 由 CodingMan 開發
  9.     [1] => [06.10 15:09:09][PyPtt][INFO] PyPtt 初始化
  10.     [2] => [06.10 15:09:09][PyPtt][INFO] 設定連線模式 ... WebSocket
  11.     [3] => [06.10 15:09:09][PyPtt][INFO] 設定語言模組 ... 繁體中文
  12.     [4] => [06.10 15:09:09][PyPtt][INFO] 設定連線主機 ... 批踢踢
  13.     [5] => [06.10 15:09:09][PyPtt][INFO] PyPtt 初始化 ... 完成
  14.     [6] => [06.10 15:09:09][PyPtt][INFO] 目前版本 1.2.14
  15.     [7] => [06.10 15:09:09][PyPtt][INFO] 登入帳號 xxxxxxxx
  16.     [8] => [06.10 15:09:09][PyPtt][INFO] 登入 ... 成功
  17.     [9] => [06.10 15:09:09][PyPtt][INFO] 取得看板資訊 facelift
  18.     [10] => [06.10 15:09:09][PyPtt][INFO] 取得看板資訊 facelift ... 成功
  19.     [11] => [06.10 15:09:09][PyPtt][INFO] 推文
  20.     [12] => [06.10 15:09:09][PyPtt][INFO] 推文 ... 成功
  21.     [13] => 登入成功
  22.     [14] => Traceback (most recent call last):
  23.     [15] =>   File "push_ptt_article.py", line 163, in <module>
  24.     [16] =>     main()
  25.     [17] =>   File "push_ptt_article.py", line 153, in main
  26.     [18] =>     result = verify(PTTBot, BoardKey, ID, Aid, Content)
  27.     [19] =>   File "push_ptt_article.py", line 109, in verify
  28.     [20] =>     post_info = PTTBot.get_post(BoardKey, aid=Aid)
  29.     [21] =>   File "/usr/local/lib/python3.8/dist-packages/PyPtt/PTT.py", line 349, in get_post
  30.     [22] =>     return _api_get_post.get_post(
  31.     [23] =>   File "/usr/local/lib/python3.8/dist-packages/PyPtt/_api_get_post.py", line 53, in get_post
  32.     [24] =>     if index > 0 and aid is not None:
  33.     [25] => TypeError: '>' not supported between instances of 'NoneType' and 'int'
  34. )
  35. 1
  36.  
  37.  
  38. :~$ pip show PyPtt
  39. Name: pyptt
  40. Version: 1.2.17
  41. Summary: PyPtt
  42. Home-page: https://pyptt.cc/
  43. Author: CodingMan
  44. Author-email: pttcodingman@gmail.com
  45. License: None
  46. Location: /home/ubuntu/.local/lib/python3.8/site-packages
  47. Requires: requests, PyYAML, uao, progressbar2, websockets, AutoStrEnum
  48. Required-by:
  49.  
  50.  
  51.  
Tags: error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement