ptpb / pb

pb is a formerly-lightweight pastebin and url shortener
Other
549 stars 52 forks source link

Error starting docker container #209

Closed 123None closed 6 years ago

123None commented 6 years ago

I am unable to start the docker container. It logs the following error:

docker logs f4a77ab6deb2286015d7809da8923df0b48bcddf671350daa6dfd27d0087ab10
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/site-packages/pb/__main__.py", line 35, in <module>
    app = create_app()
  File "/usr/local/lib/python3.6/site-packages/pb/pb.py", line 81, in create_app
    app.url_map.update()
  File "/usr/local/lib/python3.6/site-packages/werkzeug/routing.py", line 1358, in update
    self._rules.sort(key=lambda x: x.match_compare_key())
  File "/usr/local/lib/python3.6/site-packages/werkzeug/routing.py", line 1358, in <lambda>
    self._rules.sort(key=lambda x: x.match_compare_key())
  File "/usr/local/lib/python3.6/site-packages/pb/routing.py", line 32, in match_compare_key
    return not bool(self.namespace_only), bool(self.arguments), -len(self._weights), self._weights
AttributeError: 'Rule' object has no attribute '_weights'

I see the same if I manually try to start the app.

~/pb # python3 -m pb
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/root/pb/pb/__main__.py", line 35, in <module>
    app = create_app()
  File "/root/pb/pb/pb.py", line 81, in create_app
    app.url_map.update()
  File "/usr/local/lib/python3.5/dist-packages/werkzeug/routing.py", line 1358, in update
    self._rules.sort(key=lambda x: x.match_compare_key())
  File "/usr/local/lib/python3.5/dist-packages/werkzeug/routing.py", line 1358, in <lambda>
    self._rules.sort(key=lambda x: x.match_compare_key())
  File "/root/pb/pb/routing.py", line 32, in match_compare_key
    return not bool(self.namespace_only), bool(self.arguments), -len(self._weights), self._weights
AttributeError: 'Rule' object has no attribute '_weights'

How can I fix that?

buhman commented 6 years ago

Fixed in 2528e9a

buhman commented 6 years ago

Also, should actually probably just pin the versions used, so that docker containers don't randomly break.

buhman commented 6 years ago

e6f3b93faa74eb11326c3f1d86480c081404e004