[SOLVED] Using btree for key-value-database (OSError: 0)

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
beantree
Posts: 3
Joined: Thu Aug 18, 2016 11:21 am

Re: [SOLVED] Using btree for key-value-database (OSError: 0)

Post by beantree » Wed Nov 18, 2020 9:36 am

I solved this. My code was failing to close the database when I trapped an error and then errored when I tried to open it again.

User avatar
pythoncoder
Posts: 4641
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: [SOLVED] Using btree for key-value-database (OSError: 0)

Post by pythoncoder » Wed Nov 18, 2020 2:27 pm

Python context managers could be your friend here.
Peter Hinch

Post Reply