qgisred / QGISRed

GNU General Public License v2.0
23 stars 8 forks source link

ImportError: DLL load failed: The specified module could not be found. #37

Closed diogomarin closed 3 years ago

diogomarin commented 3 years ago

Hello,

I've been using the QGISRed puglin since version 0.8 and I never had any problems with installation or execution.

But this week I had a problem with the puglin initialization, see the image below for you to see the problem better.

I tried some procedures but without success, they were:

1) Delete QGISRed in programs and resources 2) Delete the QGISRed folder in user / appdata 3) Then I reinstalled the automatic puglin through the QGIS manager but the initialization error continued 4) Delete again and did the installation via ZIP but the initialization error continued. 5) I noticed that I was not asked to install the dependent files as before, I checked to see if I had created the QGISRed folder in users / appdata and it did not exist. 6) I installed the dll's from a link sent in other conversations and the QGISRed folder was created in users / appdata (only with the dll folder inside) but even so the initialization error continues.

Conclude that for QGIS error messages it is an error in python (in the python path or an error in a specific file). From what I understand or imagine I can't run the file "in _startPlugin" because it depends on other files inside the user / appdata / qgis ... / QGISRed folder and inside the folder in my C: \ directory of QGIS 3.10

Delete and reinstall QGIS 3.10 (64bits) and the error continues. Delete and reinstalled the latest version of Python on my pc and the error continues.

I'm finishing a job and I'm desperate, take a look please. erro startplugin

neslerel commented 3 years ago

Hi @diogomarin,

I never read before this issue...

Did you run the plug-in on that computer in some moment?

The error is that the plugin can not load a python dependency. I think QGis uses its own python version.

neslerel commented 3 years ago

Maybe this link can help you: https://stackoverflow.com/questions/58612306/how-to-fix-importerror-dll-load-failed-while-importing-win32api

It proposes some solutions.

neslerel commented 3 years ago

One solution is: https://stackoverflow.com/a/63453925

diogomarin commented 3 years ago

Olá @diogomarin ,

Nunca li antes esta edição ...

Você executou o plug-in naquele computador em algum momento?

O erro é que o plugin não pode carregar uma dependência Python. Acho que o QGis usa sua própria versão python.

diogomarin commented 3 years ago

Hello @neslerel

I already used the latest version of the computer perfectly.

From what it seems to me, the error started after I installed pycharm (I already uninstalled it before the previous procedures mentioned) because I am learning to program.

I made the suggestions you recommended (see images below) and to no avail.

The error at startup still continues.

Should the installation of pycharm have modified any directories? But I already uninstalled and reinstalled a new python and the error continued. "But I didn't delete the python folder under user / appdata" - Do you think it is a possible solution?

Another solution may be to reset the machine. pip install pywin32 pywin32_postinstall -install

diogomarin commented 3 years ago

@neslerel

I performed the machine reset and did the entire process of installing the qgis and QGISRed plugin.

The problem still persists. The dependent files are not required to be installed as before.

neslerel commented 3 years ago

Yes, in the last version the dependencies are only required when you are going to use some feature of the plugin.

After reset the computer, do you have install python or pycharm? Or only QGis?

Is so weird...

diogomarin commented 3 years ago

@neslerel

I installed only qgis 3.10 and python 3.8.5

As the initialization error continued I uninstalled qgis 3.10 and installed 3.14.15 pi, the error continues.

I performed the procedure you suggested installing piwin32 and postinstall.py -install, but the error continues.

See the image below, at QGIS startup it already shows the Class Factory () call error - this happens if I leave the plugin checked in the add-ons manager and installer in QGIS.

In another image, I am showing the files that exist in C: \ Users \ diogo \ AppData \ Roaming \ QGIS \ QGIS3 \ profiles \ default \ python \ plugins \ QGISRed erro continue existing files

neslerel commented 3 years ago

I think the problem is when you install python additional to QGis. Maybe there is an incompatibility with python version you are installed. I'll try to install in my computer python 3.8 and see if it generates an error.

diogomarin commented 3 years ago

@neslerel

I did some downloas here of smaller versions of python but I was not successful.

So I downloaded the smaller versions of QGIS .. to install the plugin QGIS 3.4.15 Madeira.

..

It is strange because I used the plugin in version 3.10.9 QGIS. But finally thanks for your attention.

I have some suggestions and report some bugs to do later about the plugin, a week from now when I'm free from work I open some discussions. Especially because I'm now familiarizing myself with github and the programming world.

Thank you again. ok

neslerel commented 3 years ago

I'm sorry you had so many problems, but I'm glad you managed to make it work. I'll keep it in mind and see if I can reproduce it myself to fix it.

I wait for your comments in other issues. You explain your problems very well. Thanks!

neslerel commented 3 years ago

I just installed QGIS 3.14.15 and I have the same error than you. I'm going to try to fix it for the next release.

neslerel commented 3 years ago

It will be fixed in next release (0.11). Thanks for report the issue.

diogomarin commented 3 years ago

@neslerel

Thank you for developing this tool, any errors I find I will report to you.