You're only missing one line in your script to make it work properly. Namely, you need to set the prefix path for allowing QGIS to initialize data providers. So, right before the `qgis.initQgis()`, add this line: qgis.setPrefixPath( qgis_prefix ) where `qgis_prefix` on my Windows machine is `"C:/OSGeo4W64/apps/qgis/"`. On yours, it should be something like `"C:/Program Files/QGIS 2.18/apps/qgis/"`. See [this answer](https://gis.stackexchange.com/a/155852/4972) for tips on how to know what is your QGIS prefix path. Once you do that, run your script and you won't obtain the `0 layers loaded` message anymore using your project. With no prefix path, QGIS cannot create valid layers from your project, so they apparently aren't loaded.