#๐Ÿ”’ Code breaking

17 messages ยท Page 1 of 1 (latest)

shadow rain
#

Hey guys! I am trying to make my code work but I am getting all kind of errors like import errors or attributes errors. I'd assume this isn't the cause of why it's breaking but I'd assume that's a separate issue as some packets might send undefined as a result of the client's fault.

When logging this with Sentry, the errors doesn't show like it just breaks down in silence. If I could get some help that'll be great! I am hoping to get this fixed as soon as possible.

Error message:

Traceback (most recent call last):
  File "/usr/share/game/houdini/houdini/spheniscidae.py", line 227, in __data_received
    return await self.__handle_xt_data(data)
  File "/usr/share/game/houdini/houdini/spheniscidae.py", line 171, in __handle_xt_data
    await listener(self, packet_data)
  File "/usr/share/game/houdini/houdini/handlers/__init__.py", line 89, in __call__
    await super().__call__(p, packet_data)
  File "/usr/share/game/houdini/houdini/converters.py", line 140, in __call__
    raise e
  File "/usr/share/game/houdini/houdini/converters.py", line 130, in __call__
    handler_call_arguments, handler_call_keywords = await self._deserialize(p, data)
  File "/usr/share/game/houdini/houdini/converters.py", line 103, in _deserialize
    handler_call_arguments.append(await do_conversion(converter, ctx))
  File "/usr/share/game/houdini/houdini/converters.py", line 494, in do_conversion
    return converter(ctx.argument)
ValueError: invalid literal for int() with base 10: 'undefined'
gaunt sealBOT
#

@shadow rain

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.

shadow rain
keen harbor
#

You're trying to cast a string to an integer

shadow rain
keen harbor
#

ValueError: invalid literal for int() with base 10: 'undefined'

#

!e ```py
print(int("not an integer"))

gaunt sealBOT
#

@keen harbor :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     print(int("not an integer"))
004 |           ^^^^^^^^^^^^^^^^^^^^^
005 | ValueError: invalid literal for int() with base 10: 'not an integer'
shadow rain
#

The bug is quite random by the way sometimes it would do stuff like skipping turns, and even freeze randomly. Not sure why

keen harbor
#

I'm not familiar with houdini, my guess is you're passing an argument somewhere that isn't what you think it is

shadow rain
keen harbor
#

Either try using a debugger to step through or put some strategic print statements in to see where it's breaking.

shadow rain
#

If you have any other solutions lmk

gaunt sealBOT
#
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.