Forum Discussion
Hello Crin. If you celebrate it, first I'd like to take a minute to wish you a frohe Weihnachten.
So, few interesting things to note with this error. First, this definitely happens with restaurants when you have one running, save and exit the game, and then reload the game and go back to the restaurant while it's running. There's probably other ways to trigger this, where you "load into" a restaurant running, but I know that for me I was able to force the exception like that.
For those who care about exceptions, this causes this type of exception:
Exception raised while processing zone spin up sequence: 'tuple' object has no attribute 'get' (AttributeError: 'tuple' object has no attribute 'get')
I will have attached my own exception I got from this. It's not mod free, but I know this is from the game itself and not mods, and I'm pretty mod light as it is (basically the only stuff I have in is stuff I've made myself, MCCC, Better Exceptions, and UI Cheats).
Because of where this error occurs, I have to conjecture that this can happen to those running other businesses, such as GTW Retail and C&D Vets, but I have not personally tested that. That said, I'd be a little surprised if they didn't as I imagine they use the same base code.
On to the juicy bits: why this error happens. So, funnily enough, this is such a subtle error it's kind of crazy. It's basically caused by a trailing comma, which turns something that's supposed to be a single value into a tuple. It's easier to see on our decompiled code, since it's reconstructed and the way it gets reconstructed makes it more clear it's a tuple, but on their end it very likely is just a trailing comma, which is super easy to overlook/not notice, especially if there's a bunch of documentation and stuff there, which we simply lack.
This is from business.business_customer_data in the class BusinessCustomerData.
As you can see, it's very obvious that this is a tuple here, but this is reconstructed code. This would be syntactically equivalent to the following, which is likely what they see:
Fixing the error is as "easy" as removing the trailing comma.
Good news is that I experimented with creating a fix for this that in fact does essentially remove the comma (it's a bit more complicated: essentially I replace the function with my own that's just the same thing but without the trailing comma, which is what is needed) and loading into the restaurant works perfectly. Taking it out and doing the same and I get kicked back to the world selection menu with the error code. Exact same one, too, down to the last numbers, which is rare. I tested this a few times just to see and I think it's safe to say that the mod fixes the error.
All and all, really simple error, but when I looked at the code and saw what was wrong, I screamed, because this is like the Python version of forgetting a semicolon, and as a programmer myself I know how subtle and frustrating this error can be to find and track down.
This appears to have been fixed in the 1.84 patch, looking at the new Python from the patch.
About The Sims 4 Bug Reports - Archive
Community Highlights
Recent Discussions
- 2 days ago
- 2 days ago