AI script error

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

AI script error

#1 Post by EricF »

Begin Turn 104
Saving...
[02 Oct 21:40:15] AI_5: AI_Error: AI script error : FreeOrionAI.py:generateOrders():350 - Exception not all arguments converted during string formatting while trying to generate_production_orders
Traceback (most recent call last):
File "C:/Program Files (x86)\FreeOrion\default\python\AI\FreeOrionAI.py", line 347, in generateOrders
action()
File "C:/Program Files (x86)\FreeOrion\default\python\AI\ProductionAI.py", line 410, in generate_production_orders
debug("no orbital defenses can be built at ", PlanetUtilsAI.planet_string(pid))
File "C:\Program Files (x86)\FreeOrion\python27.zip\logging\__init__.py", line 1637, in debug
root.debug(msg, *args, **kwargs)
File "C:\Program Files (x86)\FreeOrion\python27.zip\logging\__init__.py", line 1155, in debug
self._log(DEBUG, msg, args, **kwargs)
File "C:\Program Files (x86)\FreeOrion\python27.zip\logging\__init__.py", line 1286, in _log
self.handle(record)
File "C:\Program Files (x86)\FreeOrion\python27.zip\logging\__init__.py", line 1296, in handle
self.callHandlers(record)
File "C:\Program Files (x86)\FreeOrion\python27.zip\logging\__init__.py", line 1336, in callHandlers
hdlr.handle(record)
File "C:\Program Files (x86)\FreeOrion\python27.zip\logging\__init__.py", line 759, in handle
self.emit(record)
File "C:/Program Files (x86)/FreeOrion/default/python\common\configure_logging.py", line 164, in emit
record.message = record.getMessage()
File "C:\Program Files (x86)\FreeOrion\python27.zip\logging\__init__.py", line 329, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Attachments
AI_5.log
(539.94 KiB) Downloaded 228 times
AI_4.log
(615.14 KiB) Downloaded 212 times
AI_3.log
(596.13 KiB) Downloaded 225 times
AI_2.log
(515.77 KiB) Downloaded 213 times
AI_1.log
(601.36 KiB) Downloaded 236 times

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI script error

#2 Post by EricF »

Logs
Attachments
freeoriond.log
(1019.75 KiB) Downloaded 239 times
freeorion.log
(201.17 KiB) Downloaded 219 times

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI script error

#3 Post by EricF »

Every time I try to attach a save game file it gives me an error about invalid extension
Must be only able to attach plain text docs maybe?

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: AI script error

#4 Post by Dilvish »

For an AI script error, the regular client log and server log won't help much, we really need the log for the AI that had the error.

As for the saved file, even zipped they are typically too large to post here, please either open an issue and upload it there (zipped) or else upload the zip to a hosting site and post the link here.

Could you also just copy and paste the error message from the ingame messages window into a post here?

Thanks
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI script error

#5 Post by EricF »

Dilvish wrote: Wed Oct 03, 2018 6:23 am For an AI script error, the regular client log and server log won't help much, we really need the log for the AI that had the error.
Could you also just copy and paste the error message from the ingame messages window into a post here?
All the AI log files are attached to the first post. I also pasted the in game error message in the first post. :?: :?
Dilvish wrote: Wed Oct 03, 2018 6:23 am As for the saved file, even zipped they are typically too large to post here, please either open an issue and upload it there (zipped) or else upload the zip to a hosting site and post the link here.

Thanks
I will wait to get your feedback on the stuff I already submitted. If you feel you need a savegame for more info I will open an issue and upload it then. OK?

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: AI script error

#6 Post by Morlic »

Fixed in master.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: AI script error

#7 Post by Oberlus »

Is this something that should be fixed also in 0.4.8? I had not noticed this before, but I haven't have much time to play last month.

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI script error

#8 Post by EricF »

Sorry, forgot to mention that it is the latest test build; build 2018-09-30.482395a
but you probably figured that out by now...

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: AI script error

#9 Post by Morlic »

Oberlus wrote: Wed Oct 03, 2018 10:16 am Is this something that should be fixed also in 0.4.8?
No, it was added by a later commit.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: AI script error

#10 Post by Dilvish »

EricF wrote: Wed Oct 03, 2018 6:34 am All the AI log files are attached to the first post. I also pasted the in game error message in the first post. :?: :?
Ah, when I had followed the link from my list of 'unread posts' it had opened up the page just showing your posts #2 and #3, but I didn't notice the numbering on the posts or realize I needed to scroll up; sorry for the confusion.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply