title: Micropython ESP8266 Error: AttributeError: 'module' object has no attribute (works fine in Python)
body: <p>I am coding with Thonny on a ESP8266 NodeMCU with Micropython.
  I managed to flash chip with Micropython, connect, add an OLED display and run my first Hello World script.
  However, when I use some of my previously tried and tested Python Code, I get a <strong>AttributeError: 'module' object has no attribute xyz</strong> Error. From all I understand this shouldnt be a MicroPython vs python issue, so I am a bit lost. </p>
  
  <p>Here is my main.py that throws the error:</p>
  
  <pre class="lang-py prettyprint-override"><code>from machine import Pin, I2C
  import ssd1306
  from time import sleep
  import tubestatus
  
  
  # ESP8266 Pin assignment
  i2c = I2C(-1, scl=Pin(5), sda=Pin(4))
  
  oled_width = 128
  oled_height = 64
  oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)
  
  while True:
      # Create a new status object for retrieving data
      current_status = tubestatus.Status()
  
      # Get a list of tube lines
      lines = current_status.list_lines()
  
      for line in lines:
          oled.text(line, 0, 0)
          oled.text(current_status.get_status(line).description, 0, 10)
          oled.show()
          time.sleep(3)        
  
  </code></pre>
  
  <p>The <code>import tubestatus</code> refers to <a href="https://github.com/jacobtomlinson/tube-status/tree/master/tubestatus" rel="nofollow noreferrer">this</a> super simple (but working) github module which is available on the ESP8266 (and I assume is found by the main.py as it seems to refer to a missing attribute in the module).</p>
  
  <p>Any pointers are most welcome!
  Thank you</p>
  
  <p><a href="https://i.stack.imgur.com/4lOkT.png" rel="nofollow noreferrer">This shows the files on the device</a></p>