adafruit / Adafruit_CircuitPython_PyBadger

Badge-focused CircuitPython helper library for PyBadge, PyBadge LC, PyGamer and CLUE
MIT License
21 stars 26 forks source link

error type: function missing required positional argument #3 #27

Closed CaffeinatedOpe closed 4 years ago

CaffeinatedOpe commented 4 years ago

latest circuitpython and libraries as of 2/28/2020

CaffeinatedOpe commented 4 years ago

I was working on pybadge when it occurred

FoamyGuy commented 4 years ago

Can you post the code that you were using when you got this error, and/or the full text from the stacktrace?

FoamyGuy commented 4 years ago

I tested the sample code from the readme on Edge Badge with 5.0.0-rc.0 and the library from the 20200228 bundle. Everything seems to be working correctly in that case.

CaffeinatedOpe commented 4 years ago

I was using the 4.0 libraries and circuitpython 4.0, and just importing the library using from Adafriuit_pybadger import pybadger

CaffeinatedOpe commented 4 years ago

I’ll use the 5.0 versions, and see if i have any errors! Thank you!

CaffeinatedOpe commented 4 years ago

running libraries for 5, and cpy 5. error code is: Traceback (most recent call last): File "", line 1, in File "adafruit_pybadger/init.py", line 31, in File "adafruit_pybadger/pybadge.py", line 122, in File "adafruit_pybadger/pybadge.py", line 71, in init File "adafruit_pybadger/pybadger_base.py", line 138, in init TypeError: function missing required positional argument #3

FoamyGuy commented 4 years ago

@BlueWolf220 are you running this code at the REPL when this happens?

from adafruit_pybadger import pybadge

Or is it in a file like code.py or main.py?

Also double check that you have copied in all relevant libraries from the newest 5.0 library bundle to your device. Line 138 in the current pybadger_base.py is initializing the neopixels. Possibly if you have the newest versions of the pybadger library but an older version of the neopixel library it could cause this error, so make sure to get the neopixel library out of the newest bundle and copy that to your device.

CaffeinatedOpe commented 4 years ago

I downloaded the latest cpy 5 stuff yesterday. I ran the code in a code.py, but used the repel so i could copy paste the error code. also, i have 2 neopixel libraries, one with a larger file size and the other smaller, which do i use?

FoamyGuy commented 4 years ago

@BlueWolf220 You should use the one that came out of the newest bundle. In the latest bundle (20200229) neopixel.mpy file is showing 3.72kb filesize for me on windows 7.

CaffeinatedOpe commented 4 years ago

ok, ill try that.

CaffeinatedOpe commented 4 years ago

Yup! that was the problem. thank you so much for the help.

FoamyGuy commented 4 years ago

You are welcome. Glad it's working now! There is a #help-with-circuitpython section within the Adafruit Discord channel: https://adafru.it/discord. It is a great place to ask questions and get help with things like this.

CaffeinatedOpe commented 4 years ago

Thanks. i just figured, since this is the library i had a problem with, it'd be the place to go.

FoamyGuy commented 4 years ago

Yep, this works too :). Discord can sometimes help get a few extra eyes on it too though.

CaffeinatedOpe commented 4 years ago

cool! thanks