papoteur-mga / elograf

Utility for launching and configuring nerd-dictation
GNU General Public License v3.0
61 stars 4 forks source link

pkg_resources is deprecated as an API #12

Closed bouteillerAlan closed 1 year ago

bouteillerAlan commented 1 year ago

Hi, I have the following error when I run the elograf package :

/usr/bin/elograf:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('EloGraf==0.5.3', 'elograf')
Traceback (most recent call last):
  File "/usr/bin/elograf", line 4, in <module>
    __import__('pkg_resources').run_script('EloGraf==0.5.3', 'elograf')
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 722, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1561, in run_script
    exec(code, namespace, namespace)
  File "/usr/lib/python3.11/site-packages/EloGraf-0.5.3-py3.11.egg/EGG-INFO/scripts/elograf", line 3, in <module>
    import eloGraf.elograf as elograf
  File "/usr/lib/python3.11/site-packages/EloGraf-0.5.3-py3.11.egg/eloGraf/elograf.py", line 17, in <module>
    from PyQt6.QtGui import QIcon, QStandardItemModel, QStandardItem
ModuleNotFoundError: No module named 'PyQt6'

I managed to patch the last one by installing the right package from the AUR (https://archlinux.org/packages/extra/x86_64/python-pyqt6/). So maybe this is something useful to add to the readme, as a dependency.

For the first one, I don't know if it's relevant or not.

papoteur-mga commented 1 year ago

Thanks Alan for this report. I have updated the README for Qt6. I have changed also instructions for installation. Note that you have to install also pylupdate6.

/usr/bin/elograf:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('EloGraf==0.5.3', 'elograf')

I don't have such a warning. The line 4 of my script /usr/bin/elograf is void.

bouteillerAlan commented 1 year ago

It's seem this warning is from setuptools, so I think I'm going to just ignore it ^^

papoteur-mga commented 1 year ago

I wonder if this warning will caught me too in the future, when my infra will be updated (python, setuptools). For the moment, closing.