Skip to content

SyntaxError: invalid syntax when running supervisor-stdout plugin on Python 3.8 #1434

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

Closed
kristijorgji opened this issue May 18, 2021 · 2 comments

Comments

@kristijorgji
Copy link

kristijorgji commented May 18, 2021

The problem

I installed supervisor using pip like:

pip install supervisor supervisor-stdout

Installation was succesful. Then trying to open supervisord crashes:

ubuntu:~$ supervisord
Traceback (most recent call last):
  File "/usr/local/bin/supervisord", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/supervisor/supervisord.py", line 352, in main
    options.realize(args, doc=__doc__)
  File "/usr/local/lib/python3.8/dist-packages/supervisor/options.py", line 485, in realize
    Options.realize(self, *arg, **kw)
  File "/usr/local/lib/python3.8/dist-packages/supervisor/options.py", line 310, in realize
    self.process_config()
  File "/usr/local/lib/python3.8/dist-packages/supervisor/options.py", line 549, in process_config
    Options.process_config(self, do_usage=do_usage)
  File "/usr/local/lib/python3.8/dist-packages/supervisor/options.py", line 318, in process_config
    self.process_config_file(do_usage)
  File "/usr/local/lib/python3.8/dist-packages/supervisor/options.py", line 348, in process_config_file
    self.read_config(self.configfile)
  File "/usr/local/lib/python3.8/dist-packages/supervisor/options.py", line 671, in read_config
    section.process_group_configs = self.process_groups_from_parser(parser)
  File "/usr/local/lib/python3.8/dist-packages/supervisor/options.py", line 752, in process_groups_from_parser
    result_handler = self.import_spec(result_handler)
  File "/usr/local/lib/python3.8/dist-packages/supervisor/options.py", line 393, in import_spec
    return ep.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.8/dist-packages/supervisor_stdout.py", line 22
    print '%s %s | %s'%(headers['processname'], headers['channel'], data),
          ^
SyntaxError: invalid syntax

My setup and versions

Ubuntu 20.04

pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
ubuntu:~$ python3 --version
Python 3.8.5
@mnaberez mnaberez changed the title supervisord fails to start (python error) SyntaxError: invalid syntax when running supervisor-stdout plugin on Python 3.8 May 18, 2021
@mnaberez
Copy link
Member

pip install supervisor supervisor-stdout

...

File "/usr/local/lib/python3.8/dist-packages/supervisor_stdout.py", line 22
   print '%s %s | %s'%(headers['processname'], headers['channel'], data),
         ^
SyntaxError: invalid syntax

The SyntaxError above occurs when the supervisord-stdout plugin is run. This is a third party plugin that is not part of the main Supervisor project. Please report this issue to the authors of that plugin.

@mnaberez
Copy link
Member

Moved to: coderanger/supervisor-stdout#21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants