We are running into a strange behaviour while trying to use pyoidc with QGIS 2.18.x windows standalone version. Due to pip/pipy no longer working with QGIS 2.18 (see this post), we installed the pyoidc package and its dependencies manually by getting the corresponding wheel packages and running pip from the QGIS python environment though the OSGeo4W.bat console.

Installation runs fine and the pyoidc lib can be used in the python interpreter of the OSGeo4W console.

from oic.oic import Client
from oic.utils.authn.client import CLIENT_AUTHN_METHOD

client = Client(client_authn_method=CLIENT_AUTHN_METHOD)

However, when trying to use the same instructions in a qgis plugin or inside the QGIS python embeded console, we get an import error :

OSError: Cannot load native module 'Cryptodome.Cipher._raw_ecb': Trying '_raw_ecb.pyd': cannot load library '.......\Cipher_raw_ecb.pyd': error 0x7e

Does anyone have already faced this kind of problem or have any idea what is the reason why the import works well using the python console and does not work inside QGIS ?

We have already checked file permissions and nothing seems different form other libs. We have also tried with the OSGeo4W network installer, but with the same results...

We are using QGIS 2.18.17, python 2.7.5 and Windows 10 professional (1709 - 16299.371)

Your Answer

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

Browse other questions tagged or ask your own question.