0

I have the error:

Traceback (most recent call last): File "_________ (removed personal data) default/python/plugins\SDEllipse\SDEllipse.py", line 127, in run self.dlg.progressBar.setValue(0.0) TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'

And I saw that maybe changing the line 127 into self.dlg.progressBar.setValue(0), may work, but I don´t know how to do that. I´ve tried with this commands:

filepath= r"C:-------default/python/plugins/SDEllipse/SDELLIPSE.py"
pass
    def progressbar (self):
       self.dlg.progressBar.setValue(0)

But the problem persisted. How do I modify the line 127 or change the setValue?

1
  • 2
    You are trying to set the progress bar to 0.0 when it is expecting an integer such as 0 Commented Aug 9 at 18:42

1 Answer 1

7

Open C:\Users\YOU\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\SDEllipse\SDELLIPSE.py in Notepad (or preferably a better text editor like Notepad++ or VS Code that lets you navigate directly to a specific line number), scroll down to line 127 and change (or search and replace) self.dlg.progressBar.setValue(0.0) with self.dlg.progressBar.setValue(0).

Python uses indentation to define blocks of code. So make sure you don't add or remove any spaces at the start of this line and definitely don't add any tabs, otherwise you'll get an error.

So your SDELLIPSE.py file should look like the below (starting at line 123):

    def run(self):
        """Run method that performs all the real work"""
        # Do some initialisations
        # The progressbar
        self.dlg.progressBar.setValue(0)

Note - this is a bug in the plugin that was first raised in 2022 (#11) and hasn't been fixed and there's a pull request that fixes it that hasn't been merged. I assume the plugin is abandoned as the author hasn't been active on GitHub since 2021

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.