Skip to content

The yaml config inject does not work in egg (scrapyd) #722

Open
@xinatcg

Description

@xinatcg

we are using the Dependency injector in Scrapy and deploy the egg to scrapyd (by scrapy-client)

the egg already include the yaml config, but base on our test, the yaml config did not load, the env config load successfully.

we are referenced by the multiple container example:
https://python-dependency-injector.ets-labs.org/examples/application-multiple-containers.html

class Application(containers.DeclarativeContainer):
config = providers.Configuration(yaml_files=["config.yml"])

we want to try the other way base on the document:

https://python-dependency-injector.ets-labs.org/providers/configuration.html#loading-from-a-yaml-file

application = Application()
application.config.from_yaml("./config.yml")

AttributeError: 'DynamicContainer' object has no attribute 'config'

could you help whether the yaml file config injection support egg?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions