1 year ago

#358681

test-img

Asad Hussain

shiboken2, ImportError: DLL load failed: The specified procedure could not be found

I had a PyQT Project which was working very well 1-2 months ago. I made some changes (not in the PyQT Project, but in other python files in same directory) and then ran the same PyQT Project again, but now it is giving me error.

The error is as follows,

PySide2/__init__.py: Unable to import shiboken2 from e:\Programming\PyQT\Second_Project,

At the end of the error, I found this ImportError,

ImportError: DLL load failed: The specified procedure could not be found.

I have tried lots of things but still I could not find any solution to this. I tried to re-install the PySide2 but to no use. I tried to change my Python Interpreter from 3.6.0 to 3.8.6 and also 3.9.2 but again, I got the same error. I also tried other different things answered in various Stackoverflow posts but nothing has seemed to work for me.

Can anyone help me how do I resolve this? I am 100% sure that the changes I made in other python files have absolutely nothing to do with this PyQT Project and this problem did not occur because of those changes.

The lines on which I got errors are,

from PySide2 import shiboken2 # Added this line later because shiboken2 wasn't being imported, but still it did not work
import iconify as ico
from iconify.qt import QtGui as IconQtGui, QtWidgets as IconQtWidgets
import PySide2

All the imports that I am making in my main.py file,

import sys
import os
from PyQt5.sip import delete
from PySide2 import shiboken2
# import iconify as ico
from iconify.qt import QtGui as IconQtGui, QtWidgets as IconQtWidgets
import PySide2
import mysql.connector as mc
from qt_material import *
# from PyQt5 import QtWidgets, uic, QtGui
from functools import partial
# from PyQt5.QtCore import Qt
from registered_courses import reg_data
from add_section_page import Ui_Add_Section_Window
from edit_section_page import Ui_Edit_Section_Window
from add_course_page import Ui_Add_Course_Window
from edit_course_page import Ui_Edit_Course_Window
from add_room_page import Ui_Add_Room_Window
from edit_room_page import Ui_Edit_Room_Window
from add_teacher_page import Ui_Add_Teacher_Window
from edit_teacher_page import Ui_Edit_Teacher_Window
from add_registered_course import Ui_Add_Registered_Course_Window
from edit_registered_course import Ui_Edit_Registered_Course_Window
from registered_section_student_details import Ui_Registered_Section_Students_Window
from add_section_student_page import Ui_Add_Section_Student_Window
from add_room_preferences import Ui_Add_Room_Preferences_Teacher_Window 
from add_slot_preferences import Ui_Add_Slot_PReferences_Teacher_Window
import sections_timetable
import rooms_timetable
import teachers_timetable
from time_table import *
from student_clashes import *
from teacher_clashes import *
from room_clashes import *
from stylesheet import *
from util import *

#####################################

# Import GUI File
from ui_interface import *

Also, these are all the imports that are being made in my ui_interface file (the python file that is being generated by the Qt Designer)

# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'interfaceGufDiZ.ui'
##
## Created by: Qt User Interface Compiler version 5.14.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
    QRect, QSize, QUrl, Qt)
from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
    QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
    QRadialGradient)
from PySide2.QtWidgets import *

import icons_rc

python

pyqt

pyqt5

pyside

pyside2

0 Answers

Your Answer

Accepted video resources