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

Muse Dash: Change AttributeError to KeyError when Create_Item receives an item name that doesn't exist in the world #4215

Merged

Conversation

DeamonHunter
Copy link
Collaborator

What is this fixing or adding?

If a bad item exists in the item plando, Muse Dash would throw a AttributeError which does not explicitly point out the bad item. This change makes it an explicit KeyError, which makes the error similar to what other worlds would show.

How was this tested?

With tests, and by running the following yaml:

name: MuseDash
description: aaaaa
game: Muse Dash
Muse Dash:
  plando_items: [{"items": {"Extra Life": true, "Great to Perfect (10 Pack)": true, "Miss to Great (5 Pack)": true}, "world": "DLC", "force": true, "from_pool": true}]

---
name: DLC
game: DLCQuest
DLCQuest:
  progression_balancing: 0

The casing of the items is slightly off which causes the error.

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Nov 20, 2024
@DeamonHunter DeamonHunter added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Nov 20, 2024
Copy link
Collaborator

@ScipioWright ScipioWright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, clearly fixes the issue

@ScipioWright ScipioWright added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Nov 20, 2024
@DeamonHunter DeamonHunter changed the title Muse Dash: Change AttributeError to KeyError for Bad Item Plando. Muse Dash: Change AttributeError to KeyError when Create_Item receives an item name that doesn't exist in the world Nov 20, 2024
Copy link
Member

@NewSoupVi NewSoupVi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marked for merge at the start of 0.5.1

(It's so small but I really don't wanna merge any more so we don't have to have an RC4 lol)

@NewSoupVi NewSoupVi merged commit 1ba7700 into ArchipelagoMW:main Nov 29, 2024
18 checks passed
AustinSumigray pushed a commit to AustinSumigray/Archipelago that referenced this pull request Jan 4, 2025
…s an item name that doesn't exist in the world (ArchipelagoMW#4215)

* Change missing attribute error to key error.

* Swap to explicit key error

* Revert "Swap to explicit key error"

This reverts commit 7192558.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants