SumZer0-git / EDAPGui

An Autopilot for Elite Dangerous
MIT License
49 stars 23 forks source link

EDAPGui.exe does not work #37

Closed EpicStuff closed 1 year ago

EpicStuff commented 1 year ago

When I run EDAPGui.exe I get Unhandled exception in script Failed to execute script 'EDAPGui' due to unhandled exception: OpenCV(4.5.5)

Traceback (most recent call last):
  File "EDAPGui.py", line 772, in <module>
  File "EDAPGui.py", line 767, in main
  File "EDAPGui.py", line 105, in __init__
  File "ED_AP.py", line 112, in __init__
  File "Image_Templates.py", line 33, in __init__
  File "Image_Templates.py", line 49, in reload_templates
  File "Image_Templates.py", line 42, in load_template
cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
SumZer0-git commented 1 year ago

The executable has to live in the same directory where the other files are location. Need the subdirectories configs, templates, waypionts, ... to be at that location. The error message indicates it could not open the templates

EpicStuff commented 1 year ago

In the releases, you should probably replace the exe download with a zip that contains all the necessary files.

Wolfang42 commented 1 year ago

I've installed as you say. Here is my error loading it:

`Traceback (most recent call last): File "EDKeys.py", line 122, in get_bindings binding['key'] = SCANCODE[binding['pre_key']] KeyError: 'DIK_PAGEUP'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "EDAPGui.py", line 772, in os.execv(sys.executable, ['python'] + sys.argv) File "EDAPGui.py", line 767, in main print("argv was", sys.argv) File "EDAPGui.py", line 105, in init self.ed_ap = EDAutopilot(cb=self.callback) File "ED_AP.py", line 115, in init self.scrReg = Screen_Regions.Screen_Regions(self.scr, self.templ) File "EDKeys.py", line 64, in init self.keys = self.get_bindings(self.keys_to_obtain) File "EDKeys.py", line 128, in get_bindings exit(1) NameError: name 'exit' is not defined `

SumZer0-git commented 1 year ago

This key DIK_PAGEUP doesn't exist. It should be DIK_PGUP How was this key mapped? Are you using a non-english keyboard? if you can do into the discord and show your autopilot.log so we can see what the keybindings look like. The 'exit' error will need to be fixed, but that isn't the real error, it is that page up mapping.

Update: DIK_PAGEUP is not defined in the directinput.py file, and it is apparently a SHIFT+PAGEUP key. You will need to map the function to something else in ED and it should work (just worked with another person on this same thing)

SumZer0-git commented 1 year ago

going to close this issue as needed to use diff keybinding in ED

javierchileno33 commented 1 year ago

Sorry to bother, but can i fix this by putting the key mapping to default?? Ty for your work its amazing.

Edit: Btw im using latin spanish keyboard with ñ

SumZer0-git commented 12 months ago

javierchileno33, actually I do not know how to handle the diff language keyboards properly. I don't really have experience with it. Hopefully you've been able to figure it out

javierchileno33 commented 12 months ago

Yep i fix it thanks to the people in the discord, very nice folks btw