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

vfat_shuffler: cannot import name 'Embedded' from 'construct' #18

Closed
cweiske opened this issue Aug 29, 2020 · 2 comments
Closed

vfat_shuffler: cannot import name 'Embedded' from 'construct' #18

cweiske opened this issue Aug 29, 2020 · 2 comments

Comments

@cweiske
Copy link

cweiske commented Aug 29, 2020

When running vfat_shuffler.py with the latest construct installed, I get an error:

Traceback (most recent call last):
File "./bin/vfat_shuffler.py", line 3, in
from construct import (
ImportError: cannot import name 'Embedded' from 'construct' (/usr/local/lib/python3.8/dist-packages/construct/init.py)

The reason is that "Embedded" is not part of construct anymore since v2.10.

Workaround:

pip3 install construct==2.9.52

(Info taken from rytilahti/python-yeelightbt#36)

@mk-fg
Copy link
Owner

mk-fg commented Aug 29, 2020

Yeah, looks like I'm using it with construct installed for pypy3 here since god knows when, so don't really notice these changes.
Apparently new way to combine fields of different structs is to just add them together.
Should be fixed in 3cf9ecf, and this addition seem to also be supported in older construct module (2.9.x), so should work with both old and new one now.
Thanks for reporting.

@mk-fg mk-fg closed this as completed Aug 29, 2020
@cweiske
Copy link
Author

cweiske commented Sep 10, 2020

Thanks, works fine with construct 2.10.56 now.

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