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

[BUG] On Download: Error Failed to execute script '__main__' due to unhandled exception! #312

Closed
1 task done
Saghalt opened this issue Jun 8, 2024 · 6 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@Saghalt
Copy link
Contributor

Saghalt commented Jun 8, 2024

✔️ Expected Behaviour

Download of ads

🐞 Actual Behaviour

The ads list is fetched
Then the single add is opened and breaks down with error message: Failed to execute script 'main' due to unhandled exception!

📋 Steps to Reproduce

Execute kleinanzeigen-bot download -v

📺 What browsers are you seeing the problem on? (if applicable)

Microsoft Edge

💻 What operating systems are you seeing the problem on? (if applicable)

Windows

📃 Relevant log output (if applicable)

[INFO] Loaded 35 ads
[INFO] Start fetch task for your unsaved ads!
[DEBUG] -> Opening [https://www.kleinanzeigen.de/s-anzeige/wasserschuhe-rot-blau-gr*************]...
[INFO] ... pausing for 1580 ms ...
[INFO] Deleting current folder of ad...
[INFO] New directory for ad created at downloaded-ads\ad_27***.
[INFO] Extracting information from ad with title "Wasserschuhe rot-blau Gr*****"
[DEBUG] Closing Browser session...
[INFO] terminated browser with pid 11292 successfully
[ERROR] Traceback (most recent call last):
File "kleinanzeigen_bot_main_.py", line 9, in
File "kleinanzeigen_bot_init_.py", line 864, in main
File "asyncio\base_events.py", line 684, in run_until_complete
File "kleinanzeigen_bot_init_.py", line 114, in run
File "kleinanzeigen_bot_init_.py", line 823, in download_ads
File "kleinanzeigen_bot\extract.py", line 49, in download_ad
File "kleinanzeigen_bot\extract.py", line 236, in _extract_ad_page_info
File "kleinanzeigen_bot\extract.py", line 293, in extract_special_attributes_from_ad_page
File "json_init
.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Saghalt Saghalt added the bug Something isn't working label Jun 8, 2024
@Saghalt
Copy link
Contributor Author

Saghalt commented Jun 8, 2024

Latest version was used based on 0f87e55

@Saghalt
Copy link
Contributor Author

Saghalt commented Jun 8, 2024

Seems like the details could not be extracted.

The webpage source is:

            <div class="splitlinebox l-container-row" id="viewad-details">
                    <ul class="addetailslist">
                        <li class="addetailslist--detail">
                                        Art<span class="addetailslist--detail--value" >
                                        Badeschuhe</span>
                                    </li>
                                <li class="addetailslist--detail">
                                        Farbe<span class="addetailslist--detail--value" >
                                        Rot</span>
                                    </li>
                                <li class="addetailslist--detail">
                                        Größe<span class="addetailslist--detail--value" >
                                        30</span>
                                    </li>
                                <li class="addetailslist--detail">
                                        Zustand<span class="addetailslist--detail--value" >
                                        Gut</span>
                                    </li>
                                </ul>
                </div>

and dimension108 was also given
"dimension108":"color_s:rot,condition_s:ok,groesse_s:30,versand_s:t,art_s:badeschuhe"
I hope this helps

@panzli
Copy link

panzli commented Jun 8, 2024

Can confirm it under Linux with Chromium Version 125.0.6422.141 (Official Build) snap (64-bit)

@blautob
Copy link

blautob commented Jun 10, 2024

can confirm same error here

@Saghalt
Copy link
Contributor Author

Saghalt commented Jun 11, 2024

@sebthom I've done a small contribution to fix the issue. I hope you like it. Thanks for providing this powerful tool :-)

@sebthom
Copy link
Contributor

sebthom commented Jun 11, 2024

Fixed by #313

@sebthom sebthom closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants