Closed cyrilbos closed 2 years ago
same here
Could you run it from the console and see what the program outputs? Maybe you'll spot some kind of error there.
I think I'm encountering the same issue. I'm also running Windows 11 and I get this when trying to run the program from an elevated powershell console:
> .\poe_arch_scanner.exe
Traceback (most recent call last):
File "poe_arch_scanner.py", line 605, in <module>
File "poe_arch_scanner.py", line 100, in __init__
File "poe_arch_scanner.py", line 106, in _update_images
File "poe_arch_scanner.py", line 117, in _load_image
File "PIL\Image.py", line 1958, in resize
File "PIL\Image.py", line 1980, in resize
ValueError: height and width must be > 0
[27628] Failed to execute script 'poe_arch_scanner' due to unhandled exception!
If it helps, I'm running dual 1440p monitors, with PoE running on screen 2, which is set as the main display.
The problem is that pillow failed to resize the image. What is your scale value?
The problem is that pillow failed to resize the image. What is your scale value?
I have none set, I'm using Windows default value.
Is there a 'settings.ini' file in the tool directory? If so, could you try deleting it and starting the tool again?
It seems that my issue resolved itself after I started the computer again. There was no settings.ini file before staring it again.
Thanks for your help anyways :)
Would like to hear from @Vikfr0 and @YetAnotherDevWannabe before closing this issue.
same issue here, no settings.ini
I suspect that the tool somehow calculates the scale as 0. Could you try forcing it to use 0.90 scale factor by creating the settings.ini file in the tool directory with the following content:
[settings]
scanner_window = (150, 300, 600, 620)
image_scale = 0.90
confidence_threshold = 0.94
display_inventory_items = True
display_unavailable_recipes = True
still same issue, need force set x1=2560,y1=1440 after win32gui.GetWindowRect(hwnd) and win32gui.GetClientRect(hwnd) then can work
Alright, it seems that winapi function may return 0 width and height for some reason. Maybe someone with a better winapi knowledge could figure out why that happens. For now, I'll fallback to using screen resolution if that happens.
It seems that GetClientRect() may return zero width and height if the game is running in fullscreen. Is that your case @quamtum?
no , I use windowed fullscreen mode
Strange. Anyway, I'll add the code to check if width or height returned as zero and fallback to the screen resolution in that case.
Fixed here: 6284bd6
New release is out: https://github.com/4rtzel/poe-archnemesis-scanner/releases/tag/v0.1.0. Closing this issue.
Hi, I have tried running both through the release executable and the script after installing the dependencies. Both just hang with no output at all. I am using python 3.10 on Windows 11, running with admin rights. The game is running in the background when I try.