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

make build installs dependencies not compatible with Python2 #285

Open
crazyscientist opened this issue Sep 17, 2021 · 0 comments
Open

make build installs dependencies not compatible with Python2 #285

crazyscientist opened this issue Sep 17, 2021 · 0 comments

Comments

@crazyscientist
Copy link

Hi there,

after checking out the latest commit from the master branch I followed the instructions and called make build. The installation finishes successfully, but one of the dependencies relies on protobuf, which gets installed in version 3.18.0, which has dropped Python2 support.

This results in the service not being able to run due to invalid syntax:

Traceback (most recent call last):
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 586, in spawn_worker
    worker.init_process()
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/gunicorn/workers/gthread.py", line 105, in init_process
    super(ThreadWorker, self).init_process()
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 135, in init_process
    self.load_wsgi()
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 50, in load
    return self.load_pasteapp()
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 46, in load_pasteapp
    return load_pasteapp(self.cfgurl, self.relpath, global_conf=self.cfg.paste_global_conf)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/gunicorn/app/pasterapp.py", line 71, in load_pasteapp
    global_conf=global_conf)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 253, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 278, in loadobj
    return context.create()
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 715, in create
    return self.object_type.invoke(self)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 152, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
    val = callable(*args, **kw)
  File "/opt/firefoxsync/syncserver/__init__.py", line 281, in main
    config = get_configurator(global_config, **settings)
  File "/opt/firefoxsync/syncserver/__init__.py", line 273, in get_configurator
    config.include(includeme)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/pyramid/config/__init__.py", line 676, in include
    c(configurator)
  File "/opt/firefoxsync/syncserver/__init__.py", line 158, in includeme
    config.include("syncstorage", route_prefix="/storage")
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/pyramid/config/__init__.py", line 676, in include
    c(configurator)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/syncstorage/__init__.py", line 18, in includeme
    config.include("syncstorage.storage")
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/pyramid/config/__init__.py", line 676, in include
    c(configurator)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/syncstorage/storage/__init__.py", line 580, in includeme
    config.scan("syncstorage.storage", onerror=_ignore_import_errors)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/pyramid/config/__init__.py", line 881, in scan
    package, categories=categories, onerror=onerror, ignore=ignore
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/venusian/__init__.py", line 233, in scan
    onerror(modname)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/venusian/__init__.py", line 230, in scan
    __import__(modname)
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/syncstorage/storage/spanner.py", line 20, in <module>
    from google.cloud import spanner
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/google/cloud/spanner.py", line 19, in <module>
    from google.cloud.spanner_v1 import __version__
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/google/cloud/spanner_v1/__init__.py", line 21, in <module>
    from google.cloud.spanner_v1 import param_types
  File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/google/cloud/spanner_v1/param_types.py", line 17, in <module>
   from google.cloud.spanner_v1.proto import type_pb2
 File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/google/cloud/spanner_v1/proto/type_pb2.py", line 6, in <module>
   from google.protobuf import descriptor as _descriptor
 File "/opt/firefoxsync/local/local/lib/python2.7/site-packages/google/protobuf/descriptor.py", line 113
   class DescriptorBase(metaclass=DescriptorMetaclass):
                                  ^
SyntaxError: invalid syntax

Downgrading to protobuf < 3.18 seems to be a good workaround.

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

1 participant