1
1
Troubleshooting
2
- ==============================
2
+ ===============
3
3
4
4
From time to time, an error occurs when working with CircuitPython. Here are a
5
5
variety of errors that can happen, what they mean and how to fix them.
6
6
7
7
File system issues
8
- ------------------------------
8
+ ------------------
9
9
10
- If your host computer starts complaining that your CIRCUITPY drive is corrupted
10
+ If your host computer starts complaining that your `` CIRCUITPY `` drive is corrupted
11
11
or files cannot be overwritten or deleted, then you will have to erase it completely.
12
- When CircuitPython restarts it will create a fresh empty CIRCUITPY filesystem.
12
+ When CircuitPython restarts it will create a fresh empty `` CIRCUITPY `` filesystem.
13
13
14
- This often happens on Windows when the CIRCUITPY disk is not safely ejected
14
+ This often happens on Windows when the `` CIRCUITPY `` disk is not safely ejected
15
15
before being reset by the button or being disconnected from USB. This can also
16
16
happen on Linux and Mac OSX but its less likely.
17
17
18
- .. danger :: This will erase all your files in CIRCUITPY!
18
+ .. caution :: Delete ``CIRCUITPY`` filesystem and reload CircuitPython.
19
+
20
+ To reload CircuitPython (for example, to correct a corrupted filesystem),
21
+ follow the process below. It's important to note that **any files stored on the
22
+ ``CIRCUITPY`` drive will be erased **.
19
23
20
24
#. Download the appropriate flash erase uf2 from `here <https://github.com/adafruit/Adafruit_SPIFlash/tree/master/examples/flash_erase_express >`_.
21
25
#. Double-click the reset button.
@@ -24,17 +28,18 @@ happen on Linux and Mac OSX but its less likely.
24
28
#. After about 15 seconds, the NexoPixel will start flashing green. If it flashes red, the erase failed.
25
29
#. Double-click again and load the appropriate `CircuitPython .uf2 <https://github.com/adafruit/circuitpython/releases/latest >`_.
26
30
27
- ValueError: Incompatible .mpy file.
28
- -------------------------------------
31
+ ValueError: Incompatible `` .mpy `` file.
32
+ ---------------------------------------
29
33
30
- This error occurs when importing a module that is stored as a `mpy ` binary file
31
- (rather than a `py ` text file) that was generated by a different version of
34
+ This error occurs when importing a module that is stored as a `` mpy ` ` binary file
35
+ (rather than a `` py ` ` text file) that was generated by a different version of
32
36
CircuitPython than the one its being loaded into. Most versions are compatible
33
- but, rarely they aren't. In particular, the `mpy ` binary format changed between
37
+ but, rarely they aren't. In particular, the `` mpy ` ` binary format changed between
34
38
CircuitPython versions 1.x and 2.x.
35
39
36
- So, if you just upgraded to 2.x from 1.x you'll need to download a newer version
37
- of the library. They are all available in the
40
+ So, if you just upgraded to CircuitPython 2.x from 1.x you'll need to download a
41
+ newer version of the library that triggered the error on ``import ``. They are
42
+ all available in the
38
43
`Adafruit bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest >`_
39
44
and the `Community bundle <https://github.com/adafruit/CircuitPython_Community_Bundle/releases/latest >`_.
40
45
Make sure to download a version with 2.0.0 or higher in the filename.
0 commit comments