Skip to content
This repository has been archived by the owner on Sep 28, 2019. It is now read-only.

Adafruit_SSD1306.SSD1306_128_64 - TypeError: argument 1 must be string, not int #38

Closed
fosple opened this issue Sep 15, 2019 · 1 comment

Comments

@fosple
Copy link

fosple commented Sep 15, 2019

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): Raspberry Pi 3 Model B

  • Python version (run python -version or python3 -version): Python 2.7.9

  • Error message you are receiving, including any Python exception traces:

Traceback (most recent call last):
  File "stats.py", line 63, in <module>
    disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=8000000))
  File "build/bdist.linux-armv7l/egg/Adafruit_SSD1306/SSD1306.py", line 243, in __init__
  File "build/bdist.linux-armv7l/egg/Adafruit_SSD1306/SSD1306.py", line 115, in __init__
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/GPIO.py", line 278, in setup
TypeError: argument 1 must be string, not int
  • List the steps to reproduce the problem below (if possible attach code or commands
    to run):

Using example file provided by repo does not work. I'm using the SPI version. So uncommenting the following line leads to the error above:
https://github.com/adafruit/Adafruit_Python_SSD1306/blob/master/examples/stats.py#L63
disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=8000000))

How can I fix this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants