AttributeError: 'module' object has no attribute 'presentation'

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
cyberlab
Posts: 56
Joined: Sat Apr 21, 2018 5:02 am

AttributeError: 'module' object has no attribute 'presentation'

Post by cyberlab » Mon Jul 02, 2018 1:14 am

hello everyone, I have a project working 100% in an esp32 wifi kit module and install it in an esp8266 module and it works but the next day I apply voltage does not run the program because it does not find the definitions inside the modules, I have to create a new module identical to the one that does not find the definitions and send it back to the module esp8266 I restart it and work again all day turning it off and on as many times as it is but after several hours off the same thing happens again, someone has a idea why does this happen? I have version 1.94 installed

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

Re: AttributeError: 'module' object has no attribute 'presentation'

Post by pythoncoder » Mon Jul 02, 2018 10:36 am

I assume your project is started by a main.py with something like

Code: Select all

import my_project
I suggest you try a delay in main.py before starting your code:

Code: Select all

import utime
utime.sleep(30)
import my_project
The ESP8266 automatically connects to the WiFi network on start. Allowing this to happen before running your code might fix this. Better (quicker) solutions than a long delay are possible, but a delay would prove whether or not these are worth pursuing.
Peter Hinch
Index to my micropython libraries.

cyberlab
Posts: 56
Joined: Sat Apr 21, 2018 5:02 am

Re: AttributeError: 'module' object has no attribute 'presentation'

Post by cyberlab » Tue Jul 03, 2018 3:30 am

thank you for answering, I did what you suggested but the problem was not corrected, I do different tests to solve this and I found that it has something to do with the screen oled, if the vcc of the screen is connected I can not connect the nodemcu with upyloader, I have to disconnect the vcc from the screen, for connect to upyloader, then I connect the screen to vcc and run the program manually and stops because it can not find the attributes of the module that are different messages for the screen, always stops in this module, modules before this, they run.
I need to load a copy of this module with another name I do the corrections for this module I manually run the program and it works. I do a reset and it does not work again until I repeat all the above, I want to mention that in the module esp32 wifi kit said screen is included and everything works perfectly, because I want to transfer it to the esp8266? because the module and the screen They cost me 6 dlls. and the esp32 wifi kit 14 dlls.
thanks in advance for your help.
pd. sorry for my bad english.

kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: AttributeError: 'module' object has no attribute 'presentation'

Post by kevinkk525 » Tue Jul 03, 2018 7:33 am

maybe one of the data pins of your screen is connected to the wrong pin on the esp8266 (don't know for sure which ones, I think D4 on NodeMCU). I had the problem of my esp8266 not resetting if I connected a buzzer on that pin as it pulled the pin low on bootup.
That's just an idea.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

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

Re: AttributeError: 'module' object has no attribute 'presentation'

Post by pythoncoder » Tue Jul 03, 2018 8:14 am

Another possibility is a power supply problem.
Peter Hinch
Index to my micropython libraries.

cyberlab
Posts: 56
Joined: Sat Apr 21, 2018 5:02 am

Re: AttributeError: 'module' object has no attribute 'presentation'

Post by cyberlab » Wed Jul 04, 2018 12:44 am

hello to all, problem solved, you were right kevink525, in the module esp32 wifi kit the oled screen comes connected internally to the GPIO15 and GPIO4 pins, I did not make any change in this regard when passing it to esp8266 and I find out that in this module the GPIO15 should be in low state at each boot, reset or wake up, just change it for the GPIO5 and everything works perfectly, thank all, very much for your help and your time.
Attachments
Sin título.png
Sin título.png (203.94 KiB) Viewed 5634 times
esp32-heltec-32-ic2-pins.jpg
esp32-heltec-32-ic2-pins.jpg (45.09 KiB) Viewed 5634 times

kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: AttributeError: 'module' object has no attribute 'presentation'

Post by kevinkk525 » Wed Jul 04, 2018 7:37 am

You are very welcome. I searched for that error for days.. so I'm happy if others don't have to do the same. Should have been better documented in the pinouts of the devices.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

Post Reply