#๐Ÿ”’ Function requires an arguement but 0 given?

37 messages ยท Page 1 of 1 (latest)

wind widgetBOT
#

@keen reef

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

keen reef
#

Honestly this is such a nooby thing but idk why it wont work

copper solstice
#

please show your full error

keen reef
#

so far thats all it tells me

mint spruce
keen reef
#

function takes at least 1 argument (0 given)

trail lark
#

!traceback

wind widgetBOT
#
Traceback

Please provide the full traceback for your exception in order to help us identify your issue.
While the last line of the error message tells us what kind of error you got,
the full traceback will tell us which line, and other critical information to solve your problem.
Please avoid screenshots so we can copy and paste parts of the message.

A full traceback could look like:

Traceback (most recent call last):
  File "my_file.py", line 5, in <module>
    add_three("6")
  File "my_file.py", line 2, in add_three
    a = num + 3
        ~~~~^~~
TypeError: can only concatenate str (not "int") to str

If the traceback is long, use our pastebin.

copper solstice
#

it might be the try/except capturing it.
does the error come with: "No vocals: ...someerror..." ?

keen reef
#

yeah i have an except

#

\bmo\RebootMain.py:478: SyntaxWarning: invalid escape sequence '\B'
Framer2 = "assets\BMO\Mouths\Chummy_Smile_Teeth\BMO_Mouth_0350.png"
pygame 2.6.0 (SDL 2.28.4, Python 3.12.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
Bottom
Neutral
No vocals: function takes at least 1 argument (0 given)
No vocals:
No vocals:

copper solstice
#

yea, it's the try except

#

you should honestly just remove it, or limit the except to the actual error you want to catch

#

right now you're catching all errors, which is mostly never a good idea

mint spruce
keen reef
#

File "c:\Users\juno2\Documents\coding projects\bmo\RebootMain.py", line 575, in <module>
Subsystem2() #Handles pretty much the rest.
^^^^^^^^^^^^
File "c:\Users\juno2\Documents\coding projects\bmo\RebootMain.py", line 570, in Subsystem2
Listening()
File "c:\Users\juno2\Documents\coding projects\bmo\RebootMain.py", line 541, in Listening
raise e
File "c:\Users\juno2\Documents\coding projects\bmo\RebootMain.py", line 508, in Listening
C_Response(said)
File "c:\Users\juno2\Documents\coding projects\bmo\RebootMain.py", line 489, in C_Response
Transition(Target_Emotion)
File "c:\Users\juno2\Documents\coding projects\bmo\RebootMain.py", line 169, in Transition
Mouther = pygame.image.load().convert_alpha()
^^^^^^^^^^^^^^^^^^^
TypeError: function takes at least 1 argument (0 given)

#

oh jeez

#

its giving alot now

copper solstice
#

pygame.image.load(....) needs an image path as argument.

keen reef
#

crap forgot the i

#

lemme try again and se

#

thanks btw for the raise thing

#

i didnt know except got rid of so much

#

oh my god it works now

#

BRO WHAT IVE SPENT HOURS ON THIS

#

oh my god wow i juts

#

how could i be so blind

copper solstice
#

a "bare" except is hardly ever a good idea. The try/except is for error handling, not for error hiding ๐Ÿ˜„

keen reef
#

I DIDNT KNOW IT HID STUFF I DIDNT EVEN KNOW RAISE WAS A THING

#

how yall smarter than my comp sci teachers

#

what are you on jeez

#

but thanks actually probably woudve spent the whole day on this

wind widgetBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.