Error makeqstrdata.py

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Aris
Posts: 14
Joined: Wed Feb 25, 2015 1:00 pm

Error makeqstrdata.py

Post by Aris » Tue Jul 21, 2015 6:42 pm

Hi,

I got a problem while trying to run makeqstrdata.py. This is the report:

Code: Select all

Traceback (most recent call last):
  File "makeqsrtdata.py", line 108, in <module>
    do_work(sys.argv[1:])
  File "makeqstrdata.py", line 83, in do_work
    cfg_bytes_len = int(qcfgs['BYTES_IN_LEN'])
KeyError: 'BYTES_IN_LEN'
Thanks in advanced.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Error makeqstrdata.py

Post by dhylands » Tue Jul 21, 2015 7:51 pm

Which target were you building for?

Or were you running makeqstrdata.py directly?

I was able to build the latest stmhal with no errors.

When makeqstrdata.py is run for the pyboard, it runs the following:

Code: Select all

python ../py/makeqstrdata.py build-PYBV10/genhdr/qstrdefs.preprocessed.h > build-PYBV10/genhdr/qstrdefs.generated.h
and the build-PYBV10/genhdr/qstrdefs.preprocessed.h file has these 2 lines in it:

Code: Select all

QCFG(BYTES_IN_LEN, (1))
QCFG(BYTES_IN_HASH, (2))
Those 2 lines come from https://github.com/micropython/micropyt ... .h#L33-L34

Aris
Posts: 14
Joined: Wed Feb 25, 2015 1:00 pm

Re: Error makeqstrdata.py

Post by Aris » Thu Jul 23, 2015 12:58 pm

I was trying to run it directly. I wanted to add a module to micropython and I found the file "qstrdefs.generated.h". I wanted to generate it by my own but now I guess that's not how it works.

Thanks for answering so fast!:D

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Error makeqstrdata.py

Post by dhylands » Thu Jul 23, 2015 3:34 pm

Currently, the qstrs need to be generated as part of the system as a whole.

There isn't any facility to do qstrs just for a module. This is because the qstrs wind up being an integer index which needs to be unique globally across the entire program.

Post Reply