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

Fatal error detected failed to execute script autopilot #19

Open
13mosta opened this issue May 6, 2019 · 23 comments
Open

Fatal error detected failed to execute script autopilot #19

13mosta opened this issue May 6, 2019 · 23 comments

Comments

@13mosta
Copy link

13mosta commented May 6, 2019

Hello :)

When i try to run the .exe file from my desktop i get "fatal error detected - failed to execute script autopilot"

I have made sure to bind all the primary keys, even used a custom binds profile. My screen is not standard resolution (2560x1080) but i have tried running in full screen, bordered and windowless in both 2560x1080 and 1920x1080, but still nothing works. tried your most recent build and the second most recent.

INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=2560
INFO:root:SCREEN_HEIGHT=1080
INFO:root:get_latest_log=C:\Users\M\Saved Games\Frontier Developments\Elite Dangerous\Journal.190506155621.01.log
DEBUG:root:ship={'time': 556, 'status': 'in_space', 'type': 'empire_courier', 'location': 'Straae Eohn TC-D c15-0', 'star_class': None, 'target': 'Straae Eohn VN-B c16-0', 'fuel_capacity': 8.0, 'fuel_level': 7.59, 'fuel_percent': 95, 'is_scooping': False}

@skai2
Copy link
Owner

skai2 commented May 6, 2019

Hey there, glad you were interested in trying out the autopilot. Your screen resolution should work without any problems. I use 2560x1080 myself. Just be sure to use borderless. A couple of questions:

  1. Are you on windows 10?
  2. Is that attachment your entire log?

1 and 2 being true, it seems the program is having trouble obtaining your keybinds for some reason, as the next log output should be your detected keys. There are a couple of things you can try:

  1. I will be putting out a new release later today, if you'd like, check back in a couple of hours for a new version and see if that solves your problem. If it doesn't, send me the output in the console which will show on your screen and your log. Or...

  2. If you are able, try using the manual setup described at the bottom of the readme to run the script directly, if it doesn't work, send me the output on the console and I'll see if I can help you from that.

@13mosta
Copy link
Author

13mosta commented May 6, 2019

I am on windows 10. That is the entire log, yes. I can give you several versions but the only thing different is the time.

I’ll check back later to try the new build but i’m feeling there will still be a problem with finding the keybinds.

By console, do you mean the log txt file? Or is there another way to gain diagnostics i can use?

@skai2
Copy link
Owner

skai2 commented May 6, 2019

In a future version I plan on adding a debug console window, that's what I was referring to, but for now it is not available. I have just uploaded a new version you can try. Please let me know how it runs for you. If you still get errors please attach the new log file as you did before.

@13mosta
Copy link
Author

13mosta commented May 7, 2019

Good news! It no longer fails to launch. The icon shows up on the taskbar without any apparent problems. It seems to detect the right keys, however, nothing happens when i press home/end... Here is the log, bigger this time.

unfortunately i do not have, nor are familiar with python 3 or git, but i'm happy to help you troubleshoot if you want me to.


---- AUTOPILOT START -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

INFO:root:get_latest_log=C:\Users\M\Saved Games\Frontier Developments\Elite Dangerous\Journal.190507171845.01.log
DEBUG:root:ship={'time': 15, 'status': 'in_supercruise', 'type': 'empire_courier', 'location': 'Straae Eohn TC-D c15-0', 'star_class': None, 'target': 'Straae Eohn VN-B c16-0', 'fuel_capacity': 8.0, 'fuel_level': 7.59, 'fuel_percent': 95, 'is_scooping': False}
INFO:root:

---- AUTOPILOT ALIGN -----------------------------------------------------------------------------------------
DEBUG:root:align
DEBUG:root:align= speed 100
INFO:root:

---- CLEAR INPUT ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DEBUG:root:send=key:{'pre_key': 'DIK_Y', 'key': 21},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_I', 'key': 23},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_H', 'key': 35},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_K', 'key': 37},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_J', 'key': 36},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_U', 'key': 22},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_G', 'key': 34},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_F', 'key': 33},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_R', 'key': 19},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_W', 'key': 17},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_S', 'key': 31},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_A', 'key': 30},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_D', 'key': 32},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_V', 'key': 47},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_B', 'key': 48},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_E', 'key': 18},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_L', 'key': 38},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:clear_input
INFO:root:

---- CLEAR INPUT ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DEBUG:root:send=key:{'pre_key': 'DIK_Y', 'key': 21},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_I', 'key': 23},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_H', 'key': 35},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_K', 'key': 37},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_J', 'key': 36},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_U', 'key': 22},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_G', 'key': 34},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_F', 'key': 33},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_R', 'key': 19},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_W', 'key': 17},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_S', 'key': 31},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_A', 'key': 30},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_D', 'key': 32},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_V', 'key': 47},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_B', 'key': 48},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_E', 'key': 18},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:send=key:{'pre_key': 'DIK_L', 'key': 38},hold:None,repeat:1,repeat_delay:None,state:0
DEBUG:root:clear_input

@13mosta
Copy link
Author

13mosta commented May 7, 2019

I uninstalled some programs that i thought might be interferring, made a fresh log, and tried to turn it on and off a few times. Still nothing happens. This was done with secondary keys btw, but you can read the log. says it failed to load a few images?
autopilot.log

@3urobeat
Copy link

3urobeat commented May 7, 2019

I still get the error 'Failed to execute script autopilot' but i do have a bigger log than with the last version.
Here is my log aswell: https://pastebin.com/0Pxi8mc8
I also tried to run it as administrator.

@13mosta
Copy link
Author

13mosta commented May 7, 2019

NEVERMIND! Silly me bound a key to -100% throttle instead of 100%... everything works fine for me now, it even scoops! very impressive work!

There are are times when it cant align properly, but i suspect this is because of the imp-courier cockpit decoration light right behind the target indicator, combined with being in direct sunlight, makes it hard to see where to point.

After scooping i would add a much longer period of traveling away from the star, as several times now, the script will move away from a star for a few seconds, flip towards the target system (which still is behind the star) and send me crashing into the exclusion zone, damaging my ship :D

anyways great work! this is amazing. Do you want me to close the issue, and let @HerrEurobeat make his own?

@3urobeat
Copy link

3urobeat commented May 7, 2019

Maybe the problem could be for me that i have keys set to the needed actions that the program does not recognize because of different keyboard layouts or idk

@skai2
Copy link
Owner

skai2 commented May 7, 2019

@13mosta Hey, great to know it's working for you. I was scratching my head here looking at your log haha. There should've been a clearer warning indicating a missing keybind.

As for the navpoint in direct sunlight and the travelling period after scooping, you are absolutely right. These are actually the top two issues I'm aiming to resolve at the moment (particularily the post-scoop one as it's consequences are pretty bad of course).

Thank you for the valuable feedback! Do let me know if there is anything else you notice that may help development, and don't worry about closing the issue, I think in this case it's alright to leave it open for now.

@skai2
Copy link
Owner

skai2 commented May 7, 2019

@HerrEurobeat Hey there, I think your suspicion about the program not recognizing your keys is accurate. The program at the moment only supports the most common, basic keys, and the standard modifiers (shift, alt, ctrl).

I would suggest you try binding different keys to see if that solves your issue, if not, do let me know.

@13mosta
Copy link
Author

13mosta commented May 7, 2019

@skai2 Just in the slight possibility you havent seen this (or aren't the creator, haha), this is a good read https://networkgeekstuff.com/projects/autopilot-for-elite-dangerous-using-opencv-and-thoughts-on-cv-enabled-bots-in-visual-to-keyboard-loop/

I notice he seems to manage allignment better, by locking on to the circle around the target system, instead of the tiny target indicator. That script is also aware of the exclusion zone, but i suspect these features require a lot of work.

Anyways, thanks again for your time, and your awesome autopilot :)

@LukeGardner
Copy link

LukeGardner commented May 12, 2019

Hey Ho

I think I'm having a similar issue but I've not managed to get it to run. I assumed it was a keybinds issue so I reset my keybinds to the default keyboard only layout and it still fails to run.

Heres my log at the latest entry if it helps.

INFO:root:RELEASE=v19.05.09-alpha-22
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=2560
INFO:root:SCREEN_HEIGHT=1440
INFO:root:get_latest_log=C:\Users\LukeG\Saved Games\Frontier Developments\Elite Dangerous\Journal.190512145502.01.log
DEBUG:root:ship={'time': 14436, 'status': None, 'type': None, 'location': None, 'star_class': None, 'target': None, 'fuel_capacity': None, 'fuel_level': None, 'fuel_percent': 10, 'is_scooping': False}
INFO:root:get_latest_keybinds=C:\Users\LukeG\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\StartPreset.start

autopilot.log

I also had a go at running the script via the manual setup and didn't get much further.

INFO RELEASE=v19.05.09-alpha-22
INFO PATH_LOG_FILES=None
INFO PATH_KEYBINDINGS=None
INFO KEY_MOD_DELAY=0.01
INFO KEY_DEFAULT_DELAY=0.2
INFO KEY_REPEAT_DELAY=0.1
INFO FUNCTION_DEFAULT_DELAY=0.5
INFO SCREEN_WIDTH=2560
INFO SCREEN_HEIGHT=1440
INFO get_latest_log=C:\Users\LukeG\Saved Games\Frontier Developments\Elite Dangerous\Journal.190512145502.01.log
INFO get_latest_keybinds=C:\Users\LukeG\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\StartPreset.start
Traceback (most recent call last):
File "autopilot.py", line 1, in
from dev_tray import tray
File "C:\Users\LukeG\EDAutopilot\dev_tray.py", line 3, in
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "C:\Users\LukeG\EDAutopilot\dev_autopilot.py", line 374, in
keys = get_bindings()
File "C:\Users\LukeG\EDAutopilot\dev_autopilot.py", line 320, in get_bindings
bindings_tree = parse(latest_bindings)
File "C:\Users\LukeG\AppData\Local\Programs\Python\Python37-32\lib\xml\etree\ElementTree.py", line 1197, in parse
tree.parse(source, parser)
File "C:\Users\LukeG\AppData\Local\Programs\Python\Python37-32\lib\xml\etree\ElementTree.py", line 598, in parse
self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0

@skai2
Copy link
Owner

skai2 commented May 12, 2019

@LukeGardner hey there, the default keybindings most likely will not work due to not having binds for all the necessary keys and seemingly having a different structure.

The readme has a list of all necessary keys by category listed in the order they appear in the game controls menu. My suggestion is to go through the list and bind all of them to a keyboard key to see if it fixes your issue.

Let me know how it goes, cheers.

@LukeGardner
Copy link

I had another few goes rebinding everything required to my custom keybinds and still no luck.

INFO:root:RELEASE=v19.05.09-alpha-22
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=2560
INFO:root:SCREEN_HEIGHT=1440
INFO:root:get_latest_log=C:\Users\LukeG\Saved Games\Frontier Developments\Elite Dangerous\Journal.190512234139.01.log
DEBUG:root:ship={'time': 1523, 'status': None, 'type': None, 'location': None, 'star_class': None, 'target': None, 'fuel_capacity': None, 'fuel_level': None, 'fuel_percent': 10, 'is_scooping': False}
INFO:root:get_latest_keybinds=C:\Users\LukeG\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\Custom.3.0.binds

@Ros66
Copy link

Ros66 commented May 19, 2019

Hi Mate!
I have got the same error! And this is my log!
AUTOPILOT DATA ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

INFO:root:RELEASE=v19.05.15-alpha-18
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=1920
INFO:root:SCREEN_HEIGHT=1080
INFO:root:get_latest_log=C:\Users\USER\Saved Games\Frontier Developments\Elite Dangerous\Journal.190518172355.01.log
DEBUG:root:ship={'time': 132, 'status': 'in_supercruise', 'type': 'anaconda', 'location': 'Synuefe GJ-X b48-0', 'star_class': 'M', 'target': 'Synuefe GJ-X b48-8', 'fuel_capacity': 32.0, 'fuel_level': 32.0, 'fuel_percent': 100, 'is_scooping': False}
INFO:root:get_latest_keybinds=C:\Users\USER\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\Custom.3.0.binds

@skai2
Copy link
Owner

skai2 commented May 19, 2019

@LukeGardner and @Ros66 if you both could email me your custom keybinds file (the one in the log you have attached after "get_latest_keybinds=" I can take a look to see what might be causeing your issue.

@Ros66
Copy link

Ros66 commented May 20, 2019

Ok, I just sent the Email!

@Ros66
Copy link

Ros66 commented May 23, 2019

@skai2 I've tried several binds, and I got the same error. "Fatal error detected etc." if you send me your custom.3.0.binds here or by email, I 'll try it!!

@Noodles4Pasta
Copy link

Noodles4Pasta commented Jul 5, 2019

I am having the same issue... but its not detecting my binds file. it is looking in the right place but its not pulling them.

LOG file info:

INFO:root:RELEASE=v19.05.15-alpha-18
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=1920
INFO:root:SCREEN_HEIGHT=1080
INFO:root:get_latest_log=C:\Users\Noodles\Saved Games\Frontier Developments\Elite Dangerous\Journal.190703182350.01.log
DEBUG:root:ship={'time': 58214, 'status': 'in_supercruise', 'type': 'anaconda', 'location': 'Pyrie Thua AA-A d0', 'star_class': 'K', 'target': 'Slaiya VI-X c28-0', 'fuel_capacity': 32.0, 'fuel_level': 32.0, 'fuel_percent': 100, 'is_scooping': False}
INFO:root:get_latest_keybinds=C:\Users\Noodles\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\Custom.3.0.binds

Ive trie running as admin, and running in compatibility mode.... no joy.

@Noodles4Pasta
Copy link

Still cant get this to pull in my binds file. It looks in the right place, but doesnt pull the file at all.

@skai2
Copy link
Owner

skai2 commented Aug 14, 2019

Hey guys, I'm really sorry for the late reply. I ended up having to take a break from developing this project and couldn't get back to you. I intend on getting back to developing it soon.

If you're still interested, my only suggestion at the moment would be to try deleteing your keybindings file and remaking it (make sure to save a backup!), and making sure you only use standard english locale keybinds. Some people have reported success doing this, due to inadvertently having some odd key bound to something. Sorry I can't offer much more help at the moment, hopefully this works for you.

@boujuan
Copy link

boujuan commented Aug 19, 2019

Hello, I am also getting the same error, but the log shows as it can't even detect the game at all?

DEBUG:root:This is a DEBUG message. These information is usually used for troubleshooting
INFO:root:This is an INFO message. These information is usually used for conveying information
WARNING:root:some warning message. These information is usually used for warning
ERROR:root:some error message. These information is usually used for errors and should not happen
CRITICAL:root:some critical message. These information is usually used for critical error, and will usually result in an exception.
INFO:root:

---- AUTOPILOT DATA ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

INFO:root:RELEASE=v19.05.15-alpha-18
INFO:root:PATH_LOG_FILES=None
INFO:root:PATH_KEYBINDINGS=None
INFO:root:KEY_MOD_DELAY=0.01
INFO:root:KEY_DEFAULT_DELAY=0.2
INFO:root:KEY_REPEAT_DELAY=0.1
INFO:root:FUNCTION_DEFAULT_DELAY=0.5
INFO:root:SCREEN_WIDTH=1920
INFO:root:SCREEN_HEIGHT=1080

@Noodles4Pasta
Copy link

Noodles4Pasta commented Aug 19, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants