YohanWD / WTManageSquadron

War thunder manager squadron is a simple project that has for objective to be able to manage your manager squadron with ease.
GNU General Public License v3.0
0 stars 0 forks source link

error when launching the script #17

Closed pixtolero closed 12 months ago

pixtolero commented 1 year ago

Error while loading variable : not enough values to unpack (expected 8, got 6)

any idea ?

YohanWD commented 1 year ago

Hi, I fix the error, you can download 1.2.1 :)

pixtolero commented 1 year ago

merci !

pixtolero commented 1 year ago

still an error

Error while loading variable : not enough values to unpack (expected 4, got 2)

YohanWD commented 1 year ago

Yeah i "fix" a bit too fast 😅 Now it should work properly. I'll push the hotfix tomorow (can't publish new release with my phone) You still can pull ditrectly from main if you really need to launch your script today.

pixtolero commented 12 months ago

it seems fixed but now there is an error about the message sent via the discord webhook:

--- Logging error ---
Traceback (most recent call last):
  File "/spitfire/Téléchargements/WTManageSquadron/utils/utils.py", line 68, in send_discord_notif
    webhook.send(el)
  File "/usr/lib/python3.11/site-packages/discord/webhook/sync.py", line 1036, in send
    data = adapter.execute_webhook(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/discord/webhook/sync.py", line 296, in execute_webhook
    return self.request(route, session, payload=payload, multipart=multipart, files=files, params=params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/discord/webhook/sync.py", line 219, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In content: Must be 2000 or fewer in length.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/logging/__init__.py", line 1110, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/logging/__init__.py", line 953, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/logging/__init__.py", line 687, in format
    record.message = record.getMessage()
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/logging/__init__.py", line 377, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
TypeError: not all arguments converted during string formatting
Call stack:
  File "/spitfire/Téléchargements/WTManageSquadron/main.py", line 98, in <module>
    main()
  File "/spitfire/Téléchargements/WTManageSquadron/main.py", line 87, in main
    utils.send_discord_notif(discord_webhook_url,discord_msg) # exclude new player ?
  File "/spitfire/Téléchargements/WTManageSquadron/utils/utils.py", line 71, in send_discord_notif
    logger.critical("Error while sending message to webhook : ", e)
Message: 'Error while sending message to webhook : '
Arguments: (HTTPException('400 Bad Request (error code: 50035): Invalid Form Body\nIn content: Must be 2000 or fewer in length.'),)
YohanWD commented 12 months ago

Yep I got those too... it's seem my function to break big message into smaller one is broken (or never really worked...).

YohanWD commented 12 months ago

It's fix now ;)