-
Notifications
You must be signed in to change notification settings - Fork 324
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 several TypeErrors in generate_dts() with unknown mon values #873
base: dev
Are you sure you want to change the base?
Conversation
af283e7
to
a8eaf6d
Compare
This is a follow up issue discovered after the fix from #870 was applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's still a bug with monsters that don't have IVs
Traceback (most recent call last):
File "//workspace/pokealarm/PokeAlarm/Manager.py", line 651, in run
self.process_monster(event)
File "//workspace/pokealarm/PokeAlarm/Manager.py", line 817, in process_monster
self._notify_alarms(mon, rule.alarm_names, "pokemon_alert")
File "//workspace/pokealarm/PokeAlarm/Manager.py", line 727, in _notify_alarms
dts = event.generate_dts(self.__locale, self.__timezone, self.__units)
File "//workspace/pokealarm/PokeAlarm/Events/MonEvent.py", line 252, in generate_dts
if int(self.great_level) == self.great_level:
ValueError: invalid literal for int() with base 10: '???'
This is with the default alarm
a8eaf6d
to
3f46d81
Compare
Seems I forgot to push the fix... 💯 |
3f46d81
to
aed43d8
Compare
Added another commit to deal with unknown mon level |
aed43d8
to
b585b19
Compare
@LegitDongo : Is this now resolved? |
Description
When mon without encounter values generate an alarm calculate_cp(), calculate_candy_cost() and calculate_stardust_cost() called from within generate_dts() fail with an exception, since the values are Unknown.TINY strings and not ints.
Type of Change
Motivation and Context
Users reported TypeErrors with MonEvent:
1
2
3
How Has This Been Tested?
Waiting for feedback from original reporters.
Wiki Update