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

Combined Jobflow update #19

Closed
wants to merge 17 commits into from
Closed

Conversation

jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Jul 1, 2024

Binder

@jan-janssen jan-janssen mentioned this pull request Jul 1, 2024
2 tasks
@QuantumChemist
Copy link
Collaborator

in

xml_dict = XMLSchema(files(schemas) / 'qes_230310.xsd').to_dict(xml_file)

for XMLSchema we have
Expected type 'str | bytes | Path | IO[str] | IO[bytes] | XMLResource | Element | ElementTree | list[str | bytes | Path | IO[str] | IO[bytes] | XMLResource | Element | ElementTree]', got 'Traversable' instead
🤔

@jan-janssen
Copy link
Member Author

in

xml_dict = XMLSchema(files(schemas) / 'qes_230310.xsd').to_dict(xml_file)

for XMLSchema we have
Expected type 'str | bytes | Path | IO[str] | IO[bytes] | XMLResource | Element | ElementTree | list[str | bytes | Path | IO[str] | IO[bytes] | XMLResource | Element | ElementTree]', got 'Traversable' instead
🤔

I am fine with converting it to string, I guess my primary issue were the changes in the XML schema. In terms of Traversable vs Path I think for this application they are compatible: https://docs.python.org/3/library/importlib.resources.abc.html

class importlib.resources.abc.Traversable
An object with a subset of pathlib.Path methods suitable for traversing directories and opening files.
For a representation of the object on the file-system, use importlib.resources.as_file().

This should be fixed upstream.

@jan-janssen jan-janssen closed this Jul 1, 2024
@QuantumChemist
Copy link
Collaborator

in

xml_dict = XMLSchema(files(schemas) / 'qes_230310.xsd').to_dict(xml_file)

for XMLSchema we have
Expected type 'str | bytes | Path | IO[str] | IO[bytes] | XMLResource | Element | ElementTree | list[str | bytes | Path | IO[str] | IO[bytes] | XMLResource | Element | ElementTree]', got 'Traversable' instead
🤔

I am fine with converting it to string, I guess my primary issue were the changes in the XML schema. In terms of Traversable vs Path I think for this application they are compatible: https://docs.python.org/3/library/importlib.resources.abc.html

class importlib.resources.abc.Traversable
An object with a subset of pathlib.Path methods suitable for traversing directories and opening files.
For a representation of the object on the file-system, use importlib.resources.as_file().

This should be fixed upstream.

alright 👍🏻

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

Successfully merging this pull request may close these issues.

3 participants