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

missing file or path in source: aha_region_de.py #1317

Closed
droelf123 opened this issue Oct 11, 2023 · 3 comments · Fixed by #1318
Closed

missing file or path in source: aha_region_de.py #1317

droelf123 opened this issue Oct 11, 2023 · 3 comments · Fixed by #1318

Comments

@droelf123
Copy link

Hi,
I recently installed Version 1.42.0 using HACS and cant get it to run.
Changed the adress to one of the test-adresses, but same issue.

That home directory '/home/silas/tmp/test.html' seems like debug file for some server-responds. But thats not going to work :)

Any ideas?

Thanks for your help!

configuration.yaml

waste_collection_schedule:
  sources:
    - name: aha_region_de
      args:
        gemeinde: "Hannover"
        strasse: "Voltastr. / Vahrenwald"
        hnr: "25"
        zusatz: ""
Logger: waste_collection_schedule.source_shell
Source: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:136
Integration: waste_collection_schedule (documentation)
First occurred: 20:08:22 (2 occurrences)
Last logged: 20:09:05

fetch failed for source Zweckverband Abfallwirtschaft Region Hannover: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 134, in fetch entries = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/aha_region_de.py", line 85, in fetch with open("/home/silas/tmp/test.html", "w") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/silas/tmp/test.html'`
@5ila5
Copy link
Collaborator

5ila5 commented Oct 12, 2023

Looks like I forgot this there. But this file is written only when the server response is invalid and would raise an Exception anyway

if not download_buttons:
with open("/home/silas/tmp/test.html", "w") as f:
f.write(r.text)
raise Exception("Invalid response from server, check you configuration if it is correct.")

I removed the debug file in #1318

But unfortunately I could not reproduce your Error. For me all test cases (including the one you posted) return valid data

@5ila5 5ila5 reopened this Oct 12, 2023
@5ila5
Copy link
Collaborator

5ila5 commented Oct 12, 2023

Does the error persist? Maybe some server Error on their side?

@droelf123
Copy link
Author

droelf123 commented Oct 13, 2023

I had multiple waste-calendar entities from multiple tests and messed that up.
So its all up and running now.

Thanks again for your help!

@5ila5 5ila5 closed this as completed Oct 13, 2023
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

Successfully merging a pull request may close this issue.

2 participants