Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove bug with converting empty list to actionrow #997

Merged

Conversation

Damego
Copy link
Member

@Damego Damego commented Aug 3, 2022

About

This pull request fixes bug which converts empty list to list with singe actionrow and then it raises error

Invalid Form Body
Task exception was never retrieved
future: <Task finished name='Task-22' coro=<EmojiBoards.on_message_reaction_add() done, defined at C:\Users\User\OneDrive\python\discord bots\Asteroid\source\extensions\emoji_boards.py:26> exception=LibraryException('Invalid Form Body (code: 50035, severity 40)\nError at components.0.components: BASE_TYPE_REQUIRED - This field is required')>
Traceback (most recent call last):
  File "C:\Users\User\OneDrive\python\discord bots\Asteroid\source\extensions\emoji_boards.py", line 51, in on_message_reaction_add
    await self.__update_message(message, emoji_board, count)
  File "C:\Users\User\OneDrive\python\discord bots\Asteroid\source\extensions\emoji_boards.py", line 80, in __update_message
    await board_message.edit(f"{emoji_board.emoji} | {count}")
  File "d:\python_gh\library\interactions\api\models\message.py", line 929, in edit
    _dct = await self._client.edit_message(
  File "d:\python_gh\library\interactions\api\http\message.py", line 183, in edit_message
    return await self._req.request(
  File "d:\python_gh\library\interactions\api\http\request.py", line 174, in request
    raise LibraryException(
interactions.api.error.LibraryException: Invalid Form Body (code: 50035, severity 40)
Error at components.0.components: BASE_TYPE_REQUIRED - This field is required

Checklist

  • I've ran pre-commit to format and lint the change(s) made.
  • I've checked to make sure the change(s) work on 3.8.6 and higher.
  • This fixes/solves an Issue (If existent):.
    • resolves #
  • I've made this pull request for/as: (check all that apply)
    • Documentation
    • Breaking change
    • New feature/enhancement
    • Bugfix

@EdVraz EdVraz changed the title fix: fix bug with converting empty list to actionrow fix: remove bug with converting empty list to actionrow Aug 3, 2022
@EdVraz EdVraz enabled auto-merge (squash) August 3, 2022 09:28
@EdVraz EdVraz merged commit 6bf812f into interactions-py:unstable Aug 3, 2022
EdVraz added a commit that referenced this pull request Aug 10, 2022
* Update base.py

* refactor: change condition for getting error message (#973)

* refactor: change condition for getting error message

* ci: correct from checks.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* revert!: revert removed fixes for attrs (#974)

* return back fix

* return back Delta fix

* make check like Delta

* Update attrs_utils.py

* Update client.py (#975)

* refactor: move ``Emoji`` to own module (#978)

* refactor: separate Emoji to own module

* fix imports

* rename imports in http

* change brackets

* ci: pre-commit

* fix: fix incorrect role converts in Emoji

* ref: remove Role import

* fix: added default None value to optional args (#982)

* fix: fix error ``Attachment`` is not JSON serializable (#983)

* fix: fix error ``Attachment`` is not JSON serializable

* Update interactions/api/models/message.py

Co-authored-by: EdVraz <88881326+EdVraz@users.noreply.github.com>

* chore: Version bump (#984)

* feat!: Add converters to components (#981)

* refactor!: Add converters to components

* ci: run pre-commit

* doc: add missed docstring

* oop

* fix: fix option type parsing in option decorator (#986)

* fix: fix error with converting components in edit (#987)

* fix: fix error with converting components in edit

* add build components to message.edit

* doc

* Revert "doc"

This reverts commit a9eda7b.

* feat: Add support for message_delete_bulk event (#990)

* feat: add support for messa_delete_bulk event

* fix: add missing comma

* ci: weekly check. (#991)

updates:
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.2](PyCQA/flake8@4.0.1...5.0.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* feat: add ``__str__`` to ``Emoji`` (#988)

* fix: remove bug with converting empty list to actionrow (#997)

* fix: fix converting empty list to actionrow

* move check

* ci: correct from checks.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* fix: wrong sequence in getting channel overwrites (#998)

* fix: fix few bugs with reactions (#993)

* chore: bump version to 4.3.1

* fix: add search_iterable() to __all__ (#1003)

* fix: Remove empty _client attribute in _json property (#999)

* fix: Remove empty _client attribute in _json property

* refactor: conditional logic

* fix: add member's _client for message reactions (#994)

* fix: add member's _client for message reactions

* refactor: change to add_client

Yes I did not know that it exists sorry

* ci: weekly check. (#1009)

updates:
- [github.com/PyCQA/flake8: 5.0.2 → 5.0.4](PyCQA/flake8@5.0.2...5.0.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* refactor: change condition in update dispatch (#1004)

* docs: fix incorrect codeblocks (#1006)

* docs: fix incorrect codeblocks

* Update interactions/client/models/component.py

Co-authored-by: EdVraz <88881326+EdVraz@users.noreply.github.com>

Co-authored-by: EdVraz <88881326+EdVraz@users.noreply.github.com>

* feat: Add member and channel permissions calculation functions (#969)

* feat: added member and channel permissions functions

* ci: correct from checks.

* docs: update docs

* refactor: switch from ALL_PERMISSIONS to Permissions.ALL & DEFAULT

* feat: add default permissions if in DM

* fix: small fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: EdVraz <88881326+EdVraz@users.noreply.github.com>
Co-authored-by: Damego <danyabatueff@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: DeltaX <33706469+DeltaXWizard@users.noreply.github.com>
Co-authored-by: Damego <damego.dev@gmail.com>
@Damego Damego deleted the fix-converting-empty-list-to-actionrow branch December 6, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants