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

安装后flexget无法启动 #79

Open
ghost opened this issue Nov 17, 2020 · 5 comments
Open

安装后flexget无法启动 #79

ghost opened this issue Nov 17, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 17, 2020

日志如下:

root@Dhkmr24ReC:/var/log/nginx# fgc     
● [email protected] - Flexget Daemon
   Loaded: loaded (/etc/systemd/system/[email protected]; indirect; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-11-17 09:56:04 CST; 5min ago
  Process: 2812 ExecStart=/usr/local/bin/flexget -c /home/imissbanana/.config/flexget/config.yml daemon start (code=exited, status=1/FAILURE)
  Process: 2811 ExecStartPre=/bin/rm -f /home/imissbanana/.config/flexget/.config-lock (code=exited, status=0/SUCCESS)
 Main PID: 2812 (code=exited, status=1/FAILURE)

Nov 17 09:56:04 Dhkmr24ReC flexget[2812]:   File "<frozen importlib._bootstrap_external>", line 724, in exec_module
Nov 17 09:56:04 Dhkmr24ReC flexget[2812]:   File "<frozen importlib._bootstrap_external>", line 860, in get_code
Nov 17 09:56:04 Dhkmr24ReC flexget[2812]:   File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
Nov 17 09:56:04 Dhkmr24ReC flexget[2812]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Nov 17 09:56:04 Dhkmr24ReC flexget[2812]:   File "/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py", line 144
Nov 17 09:56:04 Dhkmr24ReC flexget[2812]:     if images := self.get_image(entry, img_url, config, char_count):
Nov 17 09:56:04 Dhkmr24ReC flexget[2812]:                ^
Nov 17 09:56:04 Dhkmr24ReC flexget[2812]: SyntaxError: invalid syntax
Nov 17 09:56:04 Dhkmr24ReC systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Nov 17 09:56:04 Dhkmr24ReC systemd[1]: [email protected]: Failed with result 'exit-code'.
root@Dhkmr24ReC:/var/log/nginx# 
@ghost ghost changed the title 安装后flexget 安装后flexget无法启动 Nov 17, 2020
@ghost
Copy link
Author

ghost commented Nov 17, 2020

                                        06. 客户端操作菜单                                          
  qBittorrent                    正在运行
  Deluged                        没在运行
  Deluge Web                     没在运行
  Transmission                   正在运行
  rTorrent                       正在运行
  Flexget daemon                 没在运行
  AutoDL-Irssi                   正在运行


  (01) 运行 qBittorrent          (13) 运行 rTorrent              
  (02) 关闭 qBittorrent          (14) 关闭 rTorrent              
  (03) 重启 qBittorrent          (15) 重启 rTorrent              
  (04) 运行 Transmission         (16) 运行 Deluge                
  (05) 关闭 Transmission         (17) 关闭 Deluge                
  (06) 重启 Transmission         (18) 重启 Deluge                
  (07) 运行 Flexget daemon       (19) screen rTorrent            
  (08) 关闭 Flexget daemon       (20) screen AutoDL-Irssi        
  (09) 重启 Flexget daemon       (21) 查看 Flexget 日志          
  (10) 运行 AutoDL-Irssi         (22) 编辑 Flexget 配置          
  (11) 关闭 AutoDL-Irssi         (23) 重启 seedbox               
  (12) 重启 AutoDL-Irssi         (24) 返回 main menu             


  未检测到    Deluge    的 systemd ,本菜单中    Deluge    的相关操作无法使用
  虽然某些功能无法使用,但是选项还在,你仍可以输入相关选项
  输入后本脚本会告诉你客户端已经关了或者开起来了,而实际上什么也没有发生 ←_←

你想做什么?(默认返回主菜单) 21


    └ <flexget.manager.Manager object at 0x7fc104da89d0>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/manager.py", line 213, in initialize
    extra_components=[os.path.join(self.config_base, 'components')],
                      │  │    │    │    └ '/home/imissbanana/.config/flexget'
                      │  │    │    └ <flexget.manager.Manager object at 0x7fc104da89d0>
                      │  │    └ <function join at 0x7fc10d4d8cb0>
                      │  └ <module 'posixpath' from '/opt/pyenv/versions/3.7.8/lib/python3.7/posixpath.py'>
                      └ <module 'os' from '/opt/pyenv/versions/3.7.8/lib/python3.7/os.py'>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 555, in load_plugins
    _load_plugins_from_dirs(extra_plugins)
    │                       └ ['/home/imissbanana/.config/flexget/plugins', '/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugins']
    └ <function _load_plugins_from_dirs at 0x7fc1056a6a70>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 473, in _load_plugins_from_dirs
    _import_plugin(module_name, plugin_path)
    │              │            └ PosixPath('/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py')
    │              └ 'flexget.plugins.ptsites.sites.dmhy'
    └ <function _import_plugin at 0x7fc10539c200>
> File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 424, in _import_plugin
    import_module(module_name)
    │             └ 'flexget.plugins.ptsites.sites.dmhy'
    └ <function import_module at 0x7fc10d4f2a70>
  File "/opt/pyenv/versions/3.7.8/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           │          │           │    │        │        └ 0
           │          │           │    │        └ None
           │          │           │    └ 0
           │          │           └ 'flexget.plugins.ptsites.sites.dmhy'
           │          └ <function _gcd_import at 0x7fc10d627b00>
           └ <module 'importlib._bootstrap' (frozen)>
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py", line 144
    if images := self.get_image(entry, img_url, config, char_count):
               ^

SyntaxError: invalid syntax
2020-11-17 10:05:30 CRITICAL plugin                        Exception while loading plugin flexget.plugins.ptsites.sites.dmhy
Traceback (most recent call last):
  File "/usr/local/bin/flexget", line 8, in <module>
    sys.exit(main())
    │   │    └ <function main at 0x7f9a13d370e0>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/__init__.py", line 43, in main
    manager.start()
    │       └ <function Manager.start at 0x7f9a0c661950>
    └ <flexget.manager.Manager object at 0x7f9a1528b310>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/manager.py", line 371, in start
    self.initialize()
    │    └ <function Manager.initialize at 0x7f9a0c661710>
    └ <flexget.manager.Manager object at 0x7f9a1528b310>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/manager.py", line 213, in initialize
    extra_components=[os.path.join(self.config_base, 'components')],
                      │  │    │    │    └ '/home/imissbanana/.config/flexget'
                      │  │    │    └ <flexget.manager.Manager object at 0x7f9a1528b310>
                      │  │    └ <function join at 0x7f9a15229cb0>
                      │  └ <module 'posixpath' from '/opt/pyenv/versions/3.7.8/lib/python3.7/posixpath.py'>
                      └ <module 'os' from '/opt/pyenv/versions/3.7.8/lib/python3.7/os.py'>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 555, in load_plugins
    _load_plugins_from_dirs(extra_plugins)
    │                       └ ['/home/imissbanana/.config/flexget/plugins', '/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugins']
    └ <function _load_plugins_from_dirs at 0x7f9a0d3f7a70>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 473, in _load_plugins_from_dirs
    _import_plugin(module_name, plugin_path)
    │              │            └ PosixPath('/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py')
    │              └ 'flexget.plugins.ptsites.sites.dmhy'
    └ <function _import_plugin at 0x7f9a0d0ed200>
> File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 424, in _import_plugin
    import_module(module_name)
    │             └ 'flexget.plugins.ptsites.sites.dmhy'
    └ <function import_module at 0x7f9a15243a70>
  File "/opt/pyenv/versions/3.7.8/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           │          │           │    │        │        └ 0
           │          │           │    │        └ None
           │          │           │    └ 0
           │          │           └ 'flexget.plugins.ptsites.sites.dmhy'
           │          └ <function _gcd_import at 0x7f9a15378b00>
           └ <module 'importlib._bootstrap' (frozen)>
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py", line 144
    if images := self.get_image(entry, img_url, config, char_count):
               ^

SyntaxError: invalid syntax

你还想做什么吗?(默认返回主菜单)

@ghost
Copy link
Author

ghost commented Nov 17, 2020

                                            03. 系统信息                                            
 
  CPU 型号    : Intel(R) Xeon(R) CPU E31245 @ 3.30GHz
  CPU 核心    : 2 Core(s), 2 Thread(s)
  CPU 状态    : 3300.022 MHz, % Utilization
  硬盘大小    : 1064.9 GB (14.7 GB Used)
  内存大小    : 1974 MB (564 MB Used) (28.57%)
  交换分区    : 1897 MB (0 MB Used)
  运行时间    : 0 days 0 hour 2 min
  系统负载    : 0.58, 0.64, 0.28

  操作系统    : Ubuntu 18.04 bionic (x86_64)
  系统内核    : 4.15.0-20-generic
  虚拟化      : KVM
  IPv4 地址   : 178.63.*.*
  IPv6 地址   : 未检测到公网 IPv6 地址
  服务器时间  : 2020-11-17 10:08:05

@Rhilip
Copy link
Contributor

Rhilip commented Nov 17, 2020

你自己装的flexget插件ptsites要求的python版本过高。
更具体的 这个插件使用了python 3.8的新特性 walrus 运算符,而你装的是python3.7

@ghost
Copy link
Author

ghost commented Nov 18, 2020

你自己装的flexget插件ptsites要求的python版本过高。
更具体的 这个插件使用了python 3.8的新特性 walrus 运算符,而你装的是python3.7

我升级了python3.9 还是无法打开.


    └ <flexget.manager.Manager object at 0x7f4e3ad0c310>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/manager.py", line 213, in initialize
    extra_components=[os.path.join(self.config_base, 'components')],
                      │  │    │    │    └ '/home/imissbanana/.config/flexget'
                      │  │    │    └ <flexget.manager.Manager object at 0x7f4e3ad0c310>
                      │  │    └ <function join at 0x7f4e3acaacb0>
                      │  └ <module 'posixpath' from '/opt/pyenv/versions/3.7.8/lib/python3.7/posixpath.py'>
                      └ <module 'os' from '/opt/pyenv/versions/3.7.8/lib/python3.7/os.py'>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 555, in load_plugins
    _load_plugins_from_dirs(extra_plugins)
    │                       └ ['/home/imissbanana/.config/flexget/plugins', '/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugins']
    └ <function _load_plugins_from_dirs at 0x7f4e32e78a70>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 473, in _load_plugins_from_dirs
    _import_plugin(module_name, plugin_path)
    │              │            └ PosixPath('/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py')
    │              └ 'flexget.plugins.ptsites.sites.dmhy'
    └ <function _import_plugin at 0x7f4e32b6e200>
> File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 424, in _import_plugin
    import_module(module_name)
    │             └ 'flexget.plugins.ptsites.sites.dmhy'
    └ <function import_module at 0x7f4e3acc4a70>
  File "/opt/pyenv/versions/3.7.8/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           │          │           │    │        │        └ 0
           │          │           │    │        └ None
           │          │           │    └ 0
           │          │           └ 'flexget.plugins.ptsites.sites.dmhy'
           │          └ <function _gcd_import at 0x7f4e3adf9b00>
           └ <module 'importlib._bootstrap' (frozen)>
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py", line 144
    if images := self.get_image(entry, img_url, config, char_count):
               ^

SyntaxError: invalid syntax
2020-11-18 09:48:31 CRITICAL plugin                        Exception while loading plugin flexget.plugins.ptsites.sites.dmhy
Traceback (most recent call last):
  File "/usr/local/bin/flexget", line 8, in <module>
    sys.exit(main())
    │   │    └ <function main at 0x7f3eacf350e0>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/__init__.py", line 43, in main
    manager.start()
    │       └ <function Manager.start at 0x7f3ea585f950>
    └ <flexget.manager.Manager object at 0x7f3eae489310>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/manager.py", line 371, in start
    self.initialize()
    │    └ <function Manager.initialize at 0x7f3ea585f710>
    └ <flexget.manager.Manager object at 0x7f3eae489310>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/manager.py", line 213, in initialize
    extra_components=[os.path.join(self.config_base, 'components')],
                      │  │    │    │    └ '/home/imissbanana/.config/flexget'
                      │  │    │    └ <flexget.manager.Manager object at 0x7f3eae489310>
                      │  │    └ <function join at 0x7f3eae427cb0>
                      │  └ <module 'posixpath' from '/opt/pyenv/versions/3.7.8/lib/python3.7/posixpath.py'>
                      └ <module 'os' from '/opt/pyenv/versions/3.7.8/lib/python3.7/os.py'>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 555, in load_plugins
    _load_plugins_from_dirs(extra_plugins)
    │                       └ ['/home/imissbanana/.config/flexget/plugins', '/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugins']
    └ <function _load_plugins_from_dirs at 0x7f3ea65f5a70>
  File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 473, in _load_plugins_from_dirs
    _import_plugin(module_name, plugin_path)
    │              │            └ PosixPath('/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py')
    │              └ 'flexget.plugins.ptsites.sites.dmhy'
    └ <function _import_plugin at 0x7f3ea62eb200>
> File "/opt/venv/flexget/lib/python3.7/site-packages/flexget/plugin.py", line 424, in _import_plugin
    import_module(module_name)
    │             └ 'flexget.plugins.ptsites.sites.dmhy'
    └ <function import_module at 0x7f3eae441a70>
  File "/opt/pyenv/versions/3.7.8/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           │          │           │    │        │        └ 0
           │          │           │    │        └ None
           │          │           │    └ 0
           │          │           └ 'flexget.plugins.ptsites.sites.dmhy'
           │          └ <function _gcd_import at 0x7f3eae576b00>
           └ <module 'importlib._bootstrap' (frozen)>
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "/home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py", line 144
    if images := self.get_image(entry, img_url, config, char_count):
               ^

SyntaxError: invalid syntax
root@T6inpGLytz:/usr/bin# python3 -V
Python 3.9.0

@Aniverse
Copy link
Owner

脚本里用 pyenv 装了个 Python 3.7.8 给 FlexGet 使用,即便你系统的 Python 升级到了 3.9 也不影响 FlexGet 的 Python
我脚本里之前带了一组第三方插件,这个插件现在要求 Python 3.8(之前是 3.7 可以用的)
考虑到这个插件实际上用的人应该不多(我估计大多数人都不知道我顺带装了这个插件),我干脆就把这个插件去掉了
(当然我也可以选择把脚本指定的 Python 版本升级下,不过还是先不这么做好了)

现在最简单的办法就是把出错的插件删了:

rm /home/imissbanana/.config/flexget/plugins/ptsites/sites/dmhy.py

如果还不行的话干脆

rm -rf /home/imissbanana/.config/flexget/plugins/*

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

2 participants