Closed huggenknubbel closed 2 months ago
On the first one, I have no clue, it seems indeed to extract fine but I also donot see a thing created. Probably the data is not good...I can check later this week
The second one, the error is related to the situation where the data is still being etxracted. I will add a check to avoid this. But.... on the second one there is also this error with me and although I can open it via my laptop, the app below cannot.
2024-04-29 13:04:33.787 DEBUG (SyncWorker_4) [custom_components.gtfs2.gtfs_helper] Getting gtfs with data: {'extract_from': 'url', 'file': 'leipzig2', 'url': 'https://www.mdv.de/site/uploads/gtfs_mdv.zip'}
2024-04-29 13:04:33.788 DEBUG (SyncWorker_4) [custom_components.gtfs2.gtfs_helper] Checking if extracting: leipzig2
Process Process-2:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/local/lib/python3.12/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/config/custom_components/gtfs2/gtfs_helper.py", line 426, in extract_from_zip
clean = remove_from_zip(remove_file,gtfs_dir, file[:-4])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/gtfs2/gtfs_helper.py", line 439, in remove_from_zip
zin = zipfile.ZipFile (f"{os.path.join(gtfs_dir, tempfile)}", 'r')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/gtfs2/zip_file.py", line 1262, in __init__
self._RealGetContents()
File "/config/custom_components/gtfs2/zip_file.py", line 1329, in _RealGetContents
raise BadZipFile("File is not a zip file")
custom_components.gtfs2.zip_file.BadZipFile: File is not a zip file
via the link in the doc (gtfs.pro) I found this one... not sure if this is better or not https://gtfs.pro/en/germany/Mitteldeutscher-Verkehrsverbund/mdv
Tried the 2nd one for this zone below, give me multiple responses...
And please use 0.4.5.2 to avoid hitting the limit
thanks, i will give them a try!
Closing as not reproducable with given sources via gtfs.pro
Describe the bug tried it with two gtfs zip files. first with lvb.zip and second with mdv.zip. with the first, the zip import runs fine. but if i want to create an sensor with a stop described like here, there were no data and no sensor created. If im set the radius higher, i can't save beceause there are to many stops in the radius. So it found some stops but shows nothing
So i tried the mdv.zip But can't import them breceause:
Release used Core 2024.4.4 Supervisor 2024.04.0 GTFS: 0.4.5
Additional