[BUG - Develop] Can't `|` two SaverDicts
See original GitHub issueDescribe the bug
When combining two attributes containing dict data, it fails with a traceback.
File "./TestGame/typeclasses/characters.py", line 30, in test_attr
return self.db.db_one | self.db.db_two
File "./evennia/evennia/utils/dbserialize.py", line 243, in __or__
return self._data | other
TypeError: unsupported operand type(s) for |: 'dict' and '_SaverDict
To Reproduce
Steps to reproduce the behavior:
- Store dicts in two attributes or attribute properties.
- Use the
|
operator on them - See error
Develop-branch commit
22fa2c6b8
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
[Bug] SaverDict Saving Situation · Issue #2599 - GitHub
Basically it works fine as long as you only modify foodict or obj.db.foo but not when mixing the two. It's possible there is...
Read more >How do you fix a bug you can't replicate? - Stack Overflow
Java. An application that has multiple threads might only show its bugs with a very specific timing or sequence of events. Improper concurrency...
Read more >Insect Growth and Development | WSU Tree Fruit
As the insect's rigid exoskeleton cannot expand much, it must be shed and replaced with a ... This is where two or more...
Read more >Triatomine Bug FAQs - Chagas Disease - CDC
What is a triatomine bug and what does it look like? triatomine. Various triatomine bugs in all life stages, from eggs to nymphs...
Read more >When Treatments Don't Work | US EPA
Disregarding recommended label rates (applying pesticides at too low a rate may not kill bugs and may speed up development of resistance to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh haha I completely forgot it was so recent! I hadn’t really ever needed to combine dicts until I started messing around with splicing together prototype dicts in evennia, so it’s the syntax I learned first for it.
Anyway, the main issue is that it works fine if you combine a normal dict and a saver dict, but breaks if you use two saver dicts. It’s easy enough to work around by casting one or both to
dict
first so I don’t think it’s a priority, but since it tracebacked I figured I’d report it.Resolved in #2813 !