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

name 'String' is not defined error caused by Construct 2.9 #16

Open
K4KDR opened this issue Sep 11, 2018 · 4 comments
Open

name 'String' is not defined error caused by Construct 2.9 #16

K4KDR opened this issue Sep 11, 2018 · 4 comments

Comments

@K4KDR
Copy link

K4KDR commented Sep 11, 2018

If anyone installed the LATEST version of Python package "Construct" (currently 2.9), you may encounter an error with the various "DEMOD" flowgraphs as follows: "name 'String' is not defined"

It was determined that removing Construct 2.9 and installing Construct 2.8 corrected this error.

The install command used was: pip install construct==2.8.11

Best regards, -Scott, K4KDR

@warmonkey
Copy link

perhaps you should commit out this section.... i haven't solve this yet.

@cql1983
Copy link

cql1983 commented Jan 16, 2019

i use
pip install construct==2.8.2
the error is disappeared.

@liiyuanshuai
Copy link

liiyuanshuai commented Mar 8, 2019

I didn't solve this either with installing construct2.8.11 or 2.8.2. because another error appeared:

'payload' / If(type(this.header.frametype) is EnumIntegerString,
NameError: name 'EnumIntegerString' is not defined

construct2.8 is not supported by gr-satellites.
I changed code "'message' / String(28)," to 'message' / PaddedString(28,"utf8"),\ in file "telemetry.py",the error disappeared.

@jyhi
Copy link
Contributor

jyhi commented Mar 15, 2019

Hi all, I just created PR #19, in which commit d1b73c5 addresses this issue. Locking the dependency to an old version is not always a good idea.

I changed code "'message' / String(28)," to 'message' / PaddedString(28,"utf8"),\ in file "telemetry.py",the error disappeared.

@liiyuanshuai I guess PascalString is a proper choice, since PaddedString is not recommended by construct (see https://construct.readthedocs.io/en/latest/advanced.html#strings: "PaddedString... To be honest, using this class is not recommended. It is provided only for ancient data formats.").

And it turns out that construct is not SemVer-ish at all.

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

5 participants