NaomiProject / Naomi

The Naomi Project is an open source, technology agnostic platform for developing always-on, voice-controlled applications!
https://projectnaomi.com/
MIT License
242 stars 47 forks source link

Fix check_python_import() #396

Closed aaronchantrill closed 4 months ago

aaronchantrill commented 5 months ago

Description

The file diagnose.py has a test called check_python_import which is run during the unit testing. This function is failing with the message "'FrozenImporter' has no attribute 'get_filename'".

Apparently pkgutil.get_loader() can return different types of loaders.

Related Issue

Error "'FrozenImporter' has no attribute 'get_filename'" when running unit tests #395

Motivation and Context

This fixes an issue creating false failures on unit tests.

How Has This Been Tested?

Tested on Raspberry Pi 5 and x86_64 laptop. This should not affect other areas of the code.

Types of changes

Checklist: