aeon0 / d4lf

Diablo 4 Loot Filter
MIT License
154 stars 38 forks source link

Filter Affixes not working with `img is empty` and `affix doesn't exist` errors #366

Closed zbee closed 3 weeks ago

zbee commented 3 weeks ago

With 5.7.6 I and my friend are still having problems (from #363), seemingly the most with multi-lines, but also just getting this error fairly regularly too:

img provided to image_to_text() is empty!

Once again in my case, it is sporadic - it happens reliably at login, but then doesn't really happen too often afterwards, if at all.

If we re-run problematic items with DLSS off, we usually still get the same errors.

Some images that are broken for me (3440x1440) ![image](https://github.com/user-attachments/assets/42b5e255-6abf-4ec2-9102-0e60a054e467) ![image](https://github.com/user-attachments/assets/8408590f-a9bd-4c1b-9f58-ecc40cbbc310) ![image](https://github.com/user-attachments/assets/ba0fc633-b832-45ec-99fb-7db88cb48baa) ![image](https://github.com/user-attachments/assets/e19e6c49-501b-4d92-9efa-94ae65d51ce8) ![image](https://github.com/user-attachments/assets/8fad8b0c-4915-4780-83fb-c7f91995986d) ![image](https://github.com/user-attachments/assets/9abd3386-75e9-4308-9859-2f51995dfbb1)
Some images that are broken for my friend (3840 x 2160) ![image](https://github.com/user-attachments/assets/81e413bc-1471-448d-8f1f-8725333e6a97)
My full log ``` 2024-08-18 | 14:18:50.048 | MainThread | INFO | src.logger:102 | Running version v5.7.6 2024-08-18 | 14:18:50.050 | MainThread | INFO | main:31 | Adapt your configs via gui.bat or directly in: C:\Users\Pwnjo.d4lf 2024-08-18 | 14:18:50.055 | MainThread | INFO | src.item.filter:319 | Loading profile sigils: Sigils 2024-08-18 | 14:18:50.061 | MainThread | INFO | src.item.filter:319 | Loading profile c_end: Affixes Uniques 2024-08-18 | 14:18:50.068 | MainThread | INFO | src.item.filter:319 | Loading profile e_bone: Affixes 2024-08-18 | 14:18:50.076 | MainThread | INFO | src.item.filter:319 | Loading profile e_end: Affixes Uniques 2024-08-18 | 14:18:50.080 | MainThread | INFO | src.item.filter:319 | Loading profile c_spec: Affixes Uniques 2024-08-18 | 14:18:50.088 | MainThread | INFO | src.item.filter:319 | Loading profile e_spec: Affixes Uniques 2024-08-18 | 14:18:50.092 | MainThread | INFO | src.utils.window:73 | Using WinAPI to search for window: Diablo IV.exe 2024-08-18 | 14:18:50.130 | Thread-1 (detect_window) | INFO | d4lf:131 | Setting ui resolution to 3440x1440 2024-08-18 | 14:26:52.746 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:149 | Run Loot filter 2024-08-18 | 14:26:52.967 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.ui.chest:28 | Switch Stash Tab to: 0 2024-08-18 | 14:26:54.963 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:36 | Items: 50 (favorite: 0, junk: 0) in Chest 2024-08-18 | 14:26:55.886 | ThreadPoolExecutor-0_0 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:26:56.085 | ThreadPoolExecutor-0_1 | WARNING | src.item.descr.find_affixes:124 | Affix does not exist: cleaned_str='to curse skills after being damaged for at least of your maximum life at once, you become immune for seconds. can only occur once every seconds.' ||| combined_lines='+2 to curse skills [1 - 2] (+2) after being damaged for at least 20% of your maximum life at once, you become immune for 3.1 [2.5 - 4.0] seconds. can only occur once every 20 seconds. operties lost when equipped:' 2024-08-18 | 14:26:56.090 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.item.filter:319 | Loading profile sigils: Sigils 2024-08-18 | 14:26:56.097 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.item.filter:319 | Loading profile c_end: Affixes Uniques 2024-08-18 | 14:26:56.108 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.item.filter:319 | Loading profile e_bone: Affixes Uniques 2024-08-18 | 14:26:56.119 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.item.filter:319 | Loading profile e_end: Affixes Uniques 2024-08-18 | 14:26:56.124 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.item.filter:319 | Loading profile c_spec: Affixes Uniques 2024-08-18 | 14:26:56.135 | Thread-4 (_wrapper_run_loot_interaction_method) | INFO | src.item.filter:319 | Loading profile e_spec: Affixes Uniques 2024-08-18 | 14:26:57.060 | ThreadPoolExecutor-0_3 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:26:58.163 | ThreadPoolExecutor-0_0 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:26:58.409 | ThreadPoolExecutor-0_1 | WARNING | src.item.descr.find_affixes:124 | Affix does not exist: cleaned_str='to curse skills you automatically curse enemies around you with decrepify and iron maiden. curses inflicted this way spread to surrounding targets every seconds and last seconds outside of the aura.' ||| combined_lines='+1 to curse skills [1 - 2] (+1) you automatically curse enemies around you with decrepify and iron maiden. curses inflicted this way spread to surrounding targets every 1.9 [2.5 - 0.3] seconds and last 4 seconds outside of the aura. (necromancer only) operties lost when equipped:' 2024-08-18 | 14:26:59.356 | ThreadPoolExecutor-0_3 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:26:59.569 | ThreadPoolExecutor-0_1 | WARNING | src.item.descr.find_affixes:124 | Affix does not exist: cleaned_str='cold resistance blood mist triggers corpse explosion on surrounding corpses. when blood mist detonates a corpse, its cooldown is reduced by seconds.' ||| combined_lines='+33.0% cold resistance [32.0 - 40.0]% ( +33.0%) blood mist triggers corpse explosion on surrounding corpses. when blood mist detonates a corpse, its cooldown is reduced by 0.2 [0.1 - 0.6] seconds. (necromancer only) operties lost when equipped:' 2024-08-18 | 14:27:00.514 | ThreadPoolExecutor-0_0 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:27:01.605 | ThreadPoolExecutor-0_3 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:27:01.758 | ThreadPoolExecutor-0_1 | WARNING | src.item.descr.find_affixes:124 | Affix does not exist: cleaned_str='thorns _ when you cast a skill, you heal for life. double this bonus while below life. a a he' ||| combined_lines='+109 thorns 73-121 when you cast a skill, you heal for 1.0% [0.5 - 1.5]% life. double this bonus while below 50% life. a a he operties lost when equipped:' 2024-08-18 | 14:27:13.311 | ThreadPoolExecutor-0_1 | WARNING | src.item.descr.find_affixes:124 | Affix does not exist: cleaned_str='damage per second damage per hit attacks per second very fast' ||| combined_lines='66 damage per second ( ) [578 - 866] damage per hit 1.20 attacks per second (very fast) ( +0.10)' 2024-08-18 | 14:27:15.182 | ThreadPoolExecutor-0_0 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:27:15.448 | ThreadPoolExecutor-0_3 | WARNING | src.item.descr.find_affixes:124 | Affix does not exist: cleaned_str='to basic skills you automatically curse enemies around you with decrepify and iron maiden. curses inflicted this way spread to surrounding targets every seconds and last seconds outside of the aura.' ||| combined_lines='+2 to basic skills [1 - 2] (+2) you automatically curse enemies around you with decrepify and iron maiden. curses inflicted this way spread to surrounding targets every 0.3 [2.5 - 0.3] seconds and last 4 seconds outside of the aura. (necromancer only) operties lost when equipped:' 2024-08-18 | 14:27:17.685 | Thread-3 (process) | INFO | src.overlay:161 | Stopping filter or move process 2024-08-18 | 14:29:33.459 | Thread-5 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:149 | Run Loot filter 2024-08-18 | 14:29:33.591 | Thread-5 (_wrapper_run_loot_interaction_method) | INFO | src.ui.chest:28 | Switch Stash Tab to: 0 2024-08-18 | 14:29:35.634 | Thread-5 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:36 | Items: 47 (favorite: 2, junk: 10) in Chest 2024-08-18 | 14:29:36.465 | ThreadPoolExecutor-0_3 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:29:36.683 | ThreadPoolExecutor-0_2 | WARNING | src.item.descr.find_affixes:124 | Affix does not exist: cleaned_str='to curse skills after being damaged for at least of your maximum life at once, you become immune for seconds. can only occur once every seconds.' ||| combined_lines='+2 to curse skills [1 - 2] (+2) after being damaged for at least 20% of your maximum life at once, you become immune for 3.1 [2.5 - 4.0] seconds. can only occur once every 20 seconds. operties lost when equipped:' 2024-08-18 | 14:29:37.008 | Thread-3 (process) | INFO | src.overlay:161 | Stopping filter or move process 2024-08-18 | 14:29:43.426 | Thread-6 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:149 | Run Loot filter 2024-08-18 | 14:29:43.551 | Thread-6 (_wrapper_run_loot_interaction_method) | INFO | src.ui.chest:28 | Switch Stash Tab to: 0 2024-08-18 | 14:29:45.612 | Thread-6 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:36 | Items: 46 (favorite: 3, junk: 10) in Chest 2024-08-18 | 14:29:46.460 | ThreadPoolExecutor-0_0 | WARNING | src.utils.ocr.read:51 | img provided to image_to_text() is empty! 2024-08-18 | 14:29:47.486 | Thread-3 (process) | INFO | src.overlay:161 | Stopping filter or move process 2024-08-18 | 14:34:21.870 | Thread-7 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:149 | Run Loot filter 2024-08-18 | 14:34:22.234 | Thread-7 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:36 | Items: 5 (favorite: 0, junk: 0) in Char_Inventory 2024-08-18 | 14:34:27.915 | Thread-7 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:168 | Loot Filter done 2024-08-18 | 14:34:35.203 | Thread-8 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:149 | Run Loot filter 2024-08-18 | 14:34:37.506 | Thread-8 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:36 | Items: 5 (favorite: 0, junk: 0) in Char_Inventory 2024-08-18 | 14:34:43.180 | Thread-8 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:168 | Loot Filter done 2024-08-18 | 14:35:01.247 | Thread-9 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:149 | Run Loot filter 2024-08-18 | 14:35:01.385 | Thread-9 (_wrapper_run_loot_interaction_method) | INFO | src.ui.chest:28 | Switch Stash Tab to: 0 2024-08-18 | 14:35:03.470 | Thread-9 (_wrapper_run_loot_interaction_method) | INFO | src.loot_filter:36 | Items: 48 (favorite: 1, junk: 10) in Chest 2024-08-18 | 14:35:07.835 | Thread-3 (process) | INFO | src.overlay:161 | Stopping filter or move process ```
Their partial log ![image](https://github.com/user-attachments/assets/b37c2c30-8220-476f-9a77-205d5cf16eb0)
chrisoro commented 3 weeks ago

I added your screenshots to our test base. 4 of them worked flawlessly. 2 didn't work because of advanced item comparison, please see our readme, especially the game settings section: https://github.com/aeon0/d4lf/blob/main/README.md#game-settings.

Your friends item also worked fine.

Since we are grabbing the screen, do you have any other overlay running? Discord? Obs? Nvidia?

zbee commented 3 weeks ago

No other overlays, fwiw.

because of advanced item comparison

That seems to have been the whole problem, thank you for your help.


I would request more user-friendly errors when caused by user error, though, we had no hint of that. Especially when it can be detected as user error.

chrisoro commented 3 weeks ago

I would request more user-friendly errors when caused by user error, though, we had no hint of that. Especially when it can be detected as user error.

Good idea. Will add it as a suggestion in discord, since we can detect that advanced item comparison is on