Skip to content

ValueError: self.config should be None, but is Documentation #35

Description

@blaise-io
  File "flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "flask/app.py", line 1511, in full_dispatch_request
    self.try_trigger_before_first_request_functions()
  File "flask/app.py", line 1563, in try_trigger_before_first_request_functions
    self.ensure_sync(func)()
  File "openapi_builder/builder.py", line 113, in <lambda>
    app.before_first_request(lambda: self.builder.iterate_endpoints())
  File "openapi_builder/builder.py", line 162, in iterate_endpoints
    with self.config_manager.use_documentation_context(config):
  File "python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "openapi_builder/documentation.py", line 70, in use_documentation_context
    raise ValueError(f"self.config should be None, but is {self.config}")

Our setup is with multiple Apache workers in separate processes, no threading.

Is this reproducible by calling self.builder.iterate_endpoints() multiple times?

Does https://github.com/FlyingBird95/openapi-builder/blob/master/openapi_builder/documentation.py#L63 need a contextmanager?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions