#๐Ÿ”’ work assistent

41 messages ยท Page 1 of 1 (latest)

fossil blazeBOT
#

Hey @sand kettle!

It looks like you're trying to paste code into this channel.

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
#

@sand kettle

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.

sand kettle
zinc totem
#

what is your question?

sand kettle
#

the my code stop in 25 line and i don t understand the problem

#

my english is not good,sorry

#

the voices stop in 25 line and the code don t continue

glass wing
#

Can you share the traceback error message?

#

!traceback looks like this ๐Ÿ‘‡

fossil blazeBOT
#
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.

glass wing
#

@sand kettle

sand kettle
#

yes one second

#
Exception has occurred: UnknownValueError
exception: no description
  File "C:\Users\samue\OneDrive - I.I.S. Bassi-Burgatti\2023_2024\Script\py\automazione\promemoria.py", line 29, in caga_impegni
    risposta = self.r.recognize_google(audio, language='it-IT').strip().lower()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\samue\OneDrive - I.I.S. Bassi-Burgatti\2023_2024\Script\py\automazione\promemoria.py", line 47, in <module>
    istanza.caga_impegni()
speech_recognition.exceptions.UnknownValueError: 
#

can I paste the code here? there are approximately 45 lines

glass wing
sand kettle
#

I don't think the error is related to the problem

#

it gives me that error because I don't say anything after 2 seconds

zinc totem
#

Yeah it doesn't understand what you're saying

sand kettle
#

sorry

glass wing
#

Try printing out the audio before line 29 and see if it understood what you said before it goes into recognize_google

sand kettle
#

one second

#

gives me the same error

glass wing
#

Did you print the audio?

sand kettle
#

no

#

I write the command but it didn't print anything

glass wing
sand kettle
#

yes, but my code is italian

glass wing
#

That's fine

glass wing
# sand kettle

Move your print(audio) to line 29. Before the risposta

sand kettle
#

it works

glass wing
#

Or did you mean there are no more errors?

sand kettle
#

the code works, I just had to wait 3 seconds more

glass wing
sand kettle
#

yes

glass wing
# sand kettle yes

Cool! Feel free to type !close when you're done ๐Ÿ™‚ or ask if you have doubts

sand kettle
#

ok

fossil blazeBOT
#
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.

#

๐Ÿ”’ work assistent