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

loadJSON does not define required_keys #38

Open
ckikawa opened this issue Dec 3, 2024 · 1 comment
Open

loadJSON does not define required_keys #38

ckikawa opened this issue Dec 3, 2024 · 1 comment

Comments

@ckikawa
Copy link

ckikawa commented Dec 3, 2024

Hi all, thanks for this very tidy tree drawing package!

In the newest version (v0.3.0) the loadJSON function requires a certain list of keys required_keys but never defines this list. The result is a key error that I could only get around by pinning an earlier version in my environment (v.0.2.2).

Assertion statement with required_keys here:

assert 'name' in json_translation and any(key in json_translation for key in required_keys),'JSON translation dictionary missing entries: %s'%(', '.join([entry for entry in ['name']+length_keys if (entry in json_translation)==False]))

@AAMCgenomics
Copy link

Hi @ckikawa I overcome this problem using the source code and adding it as a list with the following values:
required_keys = ['absoluteTime', 'length', 'height']
The source code could be imported in this way:
bt = imp.load_source('baltic', '/path_to_your_library/balticv.py')

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

2 participants