PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, April 27, 2022

[FIXED] How to fix/hide `Unable to enumarate family warning` in pyqt5?

 April 27, 2022     fonts, pyqt5, python, warnings     No comments   

Issue

Each time I run my python script I'm facing this warning:

qt.qpa.fonts: Unable to enumerate family

What can be the cause of this warning? How do I fix this warning? If this warning can't be fixed, how can this hide or silenced?

Edit: I've tried to install all the fonts in the warning but it still persists.

The warning is on the left side of the picture and the list of fonts installed in my Windows 10 system is on the right side. enter image description here


Solution

Warning is just a hint for the developer, not an error. You can hide this warning with:

import warnings
warnings.filterwarnings('ignore')

Im not sure about this warning but i think this warning often occurs when PyQt5 cannot find any fonts in your system.

Most often it means that you don't have fonts installed on your system. So, try to install them.

Most often fonts are installed in /usr/share/fonts directory. You can install fonts by using command:

sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic

If you are using other distribution, you can search for similar command and install fonts.



Answered By - Leon Zajchowski
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing