datetime no attribute '__new__'

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
syrekron
Posts: 8
Joined: Thu Mar 03, 2016 5:04 pm
Location: Iowa, USA

datetime no attribute '__new__'

Post by syrekron » Tue Oct 23, 2018 7:05 pm

I'm trying to use the datetime module from micropython-lib. I've copied datetime.py into the modules directory in the up-to-date esp8266 port and built the firmware. I had to remove a couple of other frozen modules to get it to fit. Code builds and loads and runs but when I try to import the module I get an error that I don't know how to track down:

Code: Select all

MicroPython v1.9.4-632-g11bc38d-dirty on 2018-10-23; ESP module with ESP8266
Type "help()" for more information.
>>> import datetime
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "datetime.py", line 1919, in <module>
  File "datetime.py", line 1836, in _create
AttributeError: type object 'tzinfo' has no attribute '__new__'
>>> 
Any suggestions?


Post Reply