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

version converter incorrect hint #317

Closed
JuliaSprenger opened this issue Mar 21, 2019 · 2 comments · Fixed by #342
Closed

version converter incorrect hint #317

JuliaSprenger opened this issue Mar 21, 2019 · 2 comments · Fixed by #342

Comments

@JuliaSprenger
Copy link
Contributor

When trying to load an odml file version 1.0 with odml version 1.4.2 the resulting error message states

odml.tools.parser_utils.InvalidVersionException: Cannot parse odML document with format version '1'. 
	Use the 'tools.VersionConverter' to import previous odML formats.

However, the version converter can not be used as described above, but needs to be explicitely imported from the submodule:

from odml.tools.version_converter import VersionConverter

Probably the VersionConverter should be linked in the odml.tools.__init__.py?

@achilleas-k
Copy link
Member

I agree with adding VersionConverter in odml.tools.__init__.py.

@achilleas-k
Copy link
Member

Looks like this isn't as simple as I thought. @mpsonntag tells me the current module structure is quite complicated and putting classes at the module level very quickly leads to import cycles. For now we should fix the error message, but in the long run we should reorganise the modules to make things a bit more sane.

mpsonntag added a commit to mpsonntag/python-odml that referenced this issue Oct 29, 2019
Closes G-Node#317

When trying to open an XML file of a previous
version, the exception message now states properly
how to import the appropriate VersionConverter.
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 a pull request may close this issue.

2 participants