'gtfs_parser' has no attribute 'GTFSFactory'

#102 · closed · 6 comments

View on GitHub ↗

u-spec-png

When I try to extract GTFS on qgis. Plugin just crashes. Here is stack trace: ``` AttributeError: module 'gtfs_parser' has no attribute 'GTFSFactory' Traceback (most recent call last): File "/home/srki/.local/share/QGIS/QGIS3/profiles/default/python/plugins/GTFS-GO-master/gtfs_go_dialog.py", line 228, in execution gtfs = gtfs_parser.GTFSFactory(feed_info["path"]) ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'gtfs_parser' has no attribute 'GTFSFactory' Python version: 3.13.5 (main, Jun 21 2025, 09:35:00) [GCC 15.1.1 20250425] QGIS version: 3.44.1-Solothurn Solothurn, exported Python Path: /usr/share/qgis/python /home/srki/.local/share/QGIS/QGIS3/profiles/default/python /home/srki/.local/share/QGIS/QGIS3/profiles/default/python/plugins /usr/share/qgis/python/plugins /usr/lib/python313.zip /usr/lib/python3.13 /usr/lib/python3.13/lib-dynload /usr/lib/python3.13/site-packages /home/srki/.local/share/QGIS/QGIS3/profiles/default/python /home/srki/.local/share/QGIS/QGIS3/profiles/default/python/plugins/GTFS-GO-master ```

Comments

jimboolio

I encountered the same, I might be interested if any workarounds are figured out

jimboolio

As I kind of assumed, the issue seems to be caused by missing dependencies, in this case I did not have this installed: https://github.com/MIERUNE/gtfs-parser/tree/21aba991d3ebe310b144da9cdf728f1c3b156499 Some other project claims that qgis plugins can't bake in the dependencies due to qgis plugin requirements. This leads to plugins not working after installation. So far of the plugins I tried, none mentioned what dependencies I'd have to install, so none worked. I got this plugin to at least load after installing gtfs-parser with `pip install gtfs-parser`. After that everything seems to work. I'm new to qgis and gis, but it is hard to believe such manual dependency resolution is supposed to happen.

eddymul

I also encountered this when I install plugin version 4.1.2 on QGIS 3.44.3-Solothurn on Ubuntu 24.04 (noble). I see in ``` $HOME/.local/share/QGIS/QGIS3/profiles/default/python/plugins/GTFS-GO-master/ ``` that it includes `gtfs_parser` directory. Using the Python console, trying to ``` >>> import gtfs_parser.gtfs_parser ``` gave me an error message that the Python import mechanism wasn't able to find `pandas`. I installed `pandas` using `sudo apt install python3-pandas`. Then, upon re-starting QGIS, GTFS-GO can now "Extract" from local GTFS zipfile. Hope it helps.

CorvusSpatial

Same error when using QGIS 3.40.1-Bratislava with Ubuntu 24.04 Installing pandas also worked for me ``` pip install pandas ``` I find Conda useful to run QGIS with different Python environments.

Azornet

In my case, using QGIS 3.44.7, just installing pandas does not work, so I deleted the gtfs_parser bundled with the extension and install the last version of gtfs_parser by pip and it worked. `pip install gtfs-parser`

Kanahiro

I guess this is already fixed. Please try v4.1.6 or later.