Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error #19

Open
ludovico85 opened this issue May 18, 2024 · 0 comments
Open

Installation error #19

ludovico85 opened this issue May 18, 2024 · 0 comments

Comments

@ludovico85
Copy link

ludovico85 commented May 18, 2024

Issue: when installing the plugin the following error appears:

TypeError: arguments did not match any overloaded call:   move(self, a0: QPoint): argument 1 has unexpected type 'float'   move(self, ax: int, ay: int): argument 1 has unexpected type 'float' 
Traceback (most recent call last):
  File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/ludov/AppData/Roaming/QGIS/QGIS3\profiles\Ludovico_GIS/python/plugins\qdraw\__init__.py", line 22, in classFactory
    return Qdraw(iface)
           ^^^^^^^^^^^^
  File "C:\Users/ludov/AppData/Roaming/QGIS/QGIS3\profiles\Ludovico_GIS/python/plugins\qdraw\qdraw.py", line 78, in __init__
    self.settings = QdrawSettings()
                    ^^^^^^^^^^^^^^^
  File "C:\Users/ludov/AppData/Roaming/QGIS/QGIS3\profiles\Ludovico_GIS/python/plugins\qdraw\qdrawsettings.py", line 36, in __init__
    self.center()
  File "C:\Users/ludov/AppData/Roaming/QGIS/QGIS3\profiles\Ludovico_GIS/python/plugins\qdraw\qdrawsettings.py", line 81, in center
    self.move((screen.width() - size.width()) / 2,
TypeError: arguments did not match any overloaded call:
  move(self, a0: QPoint): argument 1 has unexpected type 'float'
  move(self, ax: int, ay: int): argument 1 has unexpected type 'float''

QGIS version: 3.34.6

Python version: 3.12.3

Note: the error can be solved by changing the qdrawsettings.py at line 81:

Change

self.move((screen.width() - size.width()) / 2,
          (screen.height() - size.height()) / 2)

To

self.move(int((screen.width() - size.width()) / 2),
          int((screen.height() - size.height()) / 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant