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

Empty platform.driver list leads to type error #76

Open
jkempf42 opened this issue Jun 22, 2023 · 0 comments
Open

Empty platform.driver list leads to type error #76

jkempf42 opened this issue Jun 22, 2023 · 0 comments

Comments

@jkempf42
Copy link

The platform_config.yml file has a comment in it saying that you cannot load the platform.agent without having the platform.driver loaded. Since if I am not mistaken the plaform.agent needs to be loaded for the VIP bus router, you need the platform.driver even if there are no devices on the local platform, like for example a cloud deployment with just the historian and Volttron Central web application. But if you try to load the plaform.driver without any drivers (which you might also want to do if you wanted to dynamically load drivers), you get an error:

Processing config_store entriesTraceback (most recent call last):
File "/startup/setup-platform.py", line 372, in
install_agents(agents_tmp)
File "/startup/setup-platform.py", line 311, in install_agents
for key, entry in spec["config_store"].items():
AttributeError: 'NoneType' object has no attribute 'items'
error running setup-platform.py

This can be fixed by adding a test in setup-platform.py around line 311 to check if spec["config_store"] is None:

        if "config_store" in spec:
            sys.stdout.write("Processing config_store entries")
           if spec["config_store"] is not None:
                for key, entry in spec["config_store"].items():
		if "file" not in entry or not entry["file"]:
                        slogger.info(
                            f"Invalid config store entry; file must be specified for {key}"
                        )
                        sys.stderr.write(
                            "Invalid config store entry file must be specified for {}".format(
                                key
                            )

  jak
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