I am trying to upload a QGis plug-in to the official repository. When uploading the .zip file I always get back this error message:

There were errors reading plugin package (please check also your plugin's metadata). Cannot find a folder inside the compressed package: this does not seems a valid plugin

The contents of the .zip file are as follows:

├── dialogue_load.py
├── dialogue_load.ui
├── dialogue_new.py
├── dialogue_new.ui
├── help
│   ├── build
│   ├── make.bat
│   ├── Makefile
│   └── source
│       ├── conf.py
│       ├── index.rst
│       ├── _static
│       └── _templates
├── hex_utils_qgis.py
├── i18n
│   └── af.ts
├── icons
│   ├── Load.png
│   └── New.png
├── __init__.py
├── Makefile
├── metadata.txt
├── pb_tool.cfg
├── plugin_upload.py
├── pylintrc
├── README.md
├── resources.py
├── resources.qrc
├── scripts
│   ├── compile-strings.sh
│   ├── run-env-linux.sh
│   └── update-strings.sh
└── test
    ├── __init__.py
    ├── qgis_interface.py
    ├── tenbytenraster.asc
    ├── tenbytenraster.asc.aux.xml
    ├── tenbytenraster.keywords
    ├── tenbytenraster.lic
    ├── tenbytenraster.prj
    ├── tenbytenraster.qml
    ├── test_hex-utils-qgis_dialog.py
    ├── test_init.py
    ├── test_qgis_environment.py
    ├── test_resources.py
    ├── test_translations.py
    └── utilities.py

What is missing?


If you look at a few zip files already on the plugins site and open up their zip files, you'll see that the zip file contains a folder with the plugin name at the top level, and the contents of your project go underneath that

    <your project here>

I suspect this is so the user can very easily extract to their ~/.qgis2/python/plugins folder without needing to create a separate folder for the plugin.

If you're using the Plugin Builder plugin (I'm guessing from the presence of the Makefile) then running make zip will do the neccessary bundling up for you

(Been a while since I wrote a plugin, but hopefully it's still the same procedure as before)

  • 1
    make zip fails, for some reason it tries to copy the plug-in folder into itself. Therefore I zipped the hole thing including the root folder, and in that form the upload succeeded. – Luís de Sousa Jul 13 '17 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.