I just try the example
https://github.com/raspberrypi/pico- ... pio_irq.py
it complains about no module array.
But micropython version 1.13 is fine!
I tried to figure out which packages I need to run the pio_irq.py on version 1.14 ?
What is the correct packages?
-
- Posts: 4504
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Version 1.14 missing module array (fixed! Don't update with Thonny!)
Last edited by danjperron on Mon Feb 08, 2021 6:28 pm, edited 1 time in total.
-
- Posts: 6
- Joined: Thu Jan 28, 2021 1:37 pm
Re: Version 1.14 missing module array
I have just built micropython from the offical Micropython GitHub repo, following the instructions and it is there ...
Code: Select all
MicroPython v1.14-9-g9dedcf122 on 2021-02-07; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> import array
>>>
Re: Version 1.14 missing module array
You need the version from 5/2 or later from https://micropython.org/download/rp2-pico/ (that's 1.14-8 or later)
'array' is missing from older ones.
'array' is missing from older ones.
-
- Posts: 4504
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Version 1.14 missing module array (fixed ! don't update with Thonny)
Ok problem fixed!
If you let Thonny updating your Pico then you don't have the up to date one!
I just reflashed the firmware from
https://www.raspberrypi.org/documentati ... 00cac3.uf2
and it is working!
Then don't use Thonny to update the firmware!
If you let Thonny updating your Pico then you don't have the up to date one!
I just reflashed the firmware from
https://www.raspberrypi.org/documentati ... 00cac3.uf2
and it is working!
Then don't use Thonny to update the firmware!
-
- Posts: 4504
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Version 1.14 missing module array (fixed! Don't update with Thonny!)
From the Thonny update firmware using a raspberry Pi I gotYou need the version from 5/2 or later from https://micropython.org/download/rp2-pico/ (that's 1.14-8 or later)
'array' is missing from older ones.
And from the latest version from the raspberry pi site I got>>> import array
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'array'
>>> import os
>>> os.uname()
(sysname='rp2', nodename='rp2', release='1.14.0', version='v1.14 on 2021-02-02 (GNU 9.3.0 MinSizeRel)', machine='Raspberry Pi Pico with RP2040')
Then the question,>>> import array
>>> import os
>>> os.uname()
(sysname='rp2', nodename='rp2', release='1.14.0', version='v1.14 on 2021-02-05 (GNU 9.3.0 MinSizeRel)', machine='Raspberry Pi Pico with RP2040')
Why is the -8 not included in the os.uname() because both of them are V1.14.0. The date indicates only the compiling date!
Re: Version 1.14 missing module array (fixed! Don't update with Thonny!)
There's a difference between the dot and the dash version #s.
All the 1.14 releases versions are still at .0.
AFAIK the dash version IDs are build numbers of the nightly builds. No idea why these are not included in the internal ID.
Maybe ask the devs on github ?
All the 1.14 releases versions are still at .0.
AFAIK the dash version IDs are build numbers of the nightly builds. No idea why these are not included in the internal ID.
Maybe ask the devs on github ?
Re: Version 1.14 missing module array (fixed! Don't update with Thonny!)
Arghh, I just ran into this after updating the Pico with Thonny. I'm not clear on how to fix this. Where can I find the correct update and how do I install it?
UPDATE: ok, I tried the latest from https://micropython.org/download/rp2-pico/
which was: rp2-pico-20210306-unstable-v1.14-83-g680ce4532.uf2 which seems to fix it.
Code: Select all
MicroPython v1.14 on 2021-02-02; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> %Run -c $EDITOR_CONTENT
Traceback (most recent call last):
File "<stdin>", line 16, in <module>
File "rp2.py", line 228, in asm_pio
File "rp2.py", line 36, in __init__
ImportError: no module named 'array'
which was: rp2-pico-20210306-unstable-v1.14-83-g680ce4532.uf2 which seems to fix it.
Code: Select all
MicroPython v1.14 on 2021-03-06; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> %Run -c $EDITOR_CONTENT
>>>
Re: Version 1.14 missing module array (fixed! Don't update with Thonny!)
That's what my own builds are using as a baseline ...jbeale wrote: ↑Sat Mar 06, 2021 5:15 amUPDATE: ok, I tried the latest from https://micropython.org/download/rp2-pico/
which was: rp2-pico-20210306-unstable-v1.14-83-g680ce4532.uf2 which seems to fix it.
Code: Select all
MicroPython v1.14-83-g680ce4532-dirty on 2021-03-06; RP2HACK with RP2040
Type "help()" for more information.
>>> import os
>>> os.uname()
(sysname='rp2', nodename='rp2', release='1.14.0', version='v1.14-83-g680ce4532-dirty on 2021-03-06 (GNU 7.3.1 MinSizeRel)', machine='RP2HACK with RP2040')
The code which prints that is below, and it is similar elsewhere when the banner is emitted -
~/pico/micropython/lib/utils/pyexec.c
Code: Select all
mp_hal_stdout_tx_str("MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME "\r\n");
Code: Select all
pi@Pi3B:~/pico/micropython $ python3 ~/pico/micropython/py/makeversionhdr.py xyzzy
GEN xyzzy
pi@Pi3B:~/pico/micropython $ cat xyzzy
// This file was generated by py/makeversionhdr.py
#define MICROPY_GIT_TAG "v1.14-83-g680ce4532-dirty"
#define MICROPY_GIT_HASH "680ce4532-dirty"
#define MICROPY_BUILD_DATE "2021-03-06"
- aivarannamaa
- Posts: 64
- Joined: Wed Dec 12, 2012 1:58 pm
- Location: Estonia
Re: Version 1.14 missing module array (fixed! Don't update with Thonny!)
FYI, Thonny's Pico firmware updater now uses 20210205 variant, so you can use Thonny's updater again. No need to upgrade Thonny for this (It always takes the download url from https://raw.githubusercontent.com/thonn ... mware.json)
Aivar
https://thonny.org
https://thonny.org
Re: Version 1.14 missing module array (fixed! Don't update with Thonny!)
aivarannamaa wrote: ↑Wed Mar 10, 2021 3:06 pmFYI, Thonny's Pico firmware updater now uses 20210205 variant, so you can use Thonny's updater again. No need to upgrade Thonny for this (It always takes the download url from https://raw.githubusercontent.com/thonn ... mware.json)
Code: Select all
{
"tag_name": "v1.14-0205",
"name": "20210205 v1.14",
"published_at": "2021-02-05T00:00:00Z",
"assets": [
{
"name": "rp2-pico-micropython-20210205-v1.14.uf2",
"label": null,
"size": 497664,
"browser_download_url": "https://www.raspberrypi.org/documentation/rp2040/getting-started/static/f70cc2e37832cde5a107f6f2af06b4bc/rp2-pico-20210205-unstable-v1.14-8-g1f800cac3.uf2"
}
]
}
Could it not simply say "rp2-pico-20210205-unstable-v1.14-8-g1f800cac3.uf2" or whatever it is downloading and be done with it ?