NotModuleNamed error with resource_rc.py

Hello, I have an issue with my compiled ui.py file. The problem is that my “mainwindow_ui.py” file can’t locate my already compiled resource_rc.py file (When importing resource_rc.py into de ui.py I get a NotModuleNamed error), even though they are in the same folder. The only workaround I found was to use (current_folder).resource_rc.py, and that made everything work as expected.
However, as ui.py files are autogenerated I know it isn’t good practice, any solution? :frowning:

psdt: I’m working in a virtual environment

Added screenshots to better explain what I mean

the self generated ui.py give me ModuleNotFoundError with the original import catalog_rc

I fixed it this way:

What is the correct way to fix the import issue without editing the auto-generated ui.py file?

Hi @cristian_david_mille
I want be 100% clear:

  1. both catalog_rc.py and file from screenshot with class Ui_catalogWindow) are in ui directory?
  2. this second file is auto-generated from Qt Designer
  3. and you need access to catalog_rc.py (due to some images, icons etc) included in Designer?

Right?

PS. Are you using Ui_catalogWindow in any other module?