close

[Fixed] TypeError: worker() takes 0 positional arguments but 1 was given

Today We are Going To Solve TypeError: worker() takes 0 positional arguments but 1 was given in Python. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix TypeError: worker() takes 0 positional arguments but 1 was given Error?

  1. How to Fix TypeError: worker() takes 0 positional arguments but 1 was given Error?

    To Fix TypeError: worker() takes 0 positional arguments but 1 was given Error just Add self. You just have to add self as a parameter in your worker method in KeyStatisticCollection. By adding this you can solve your error. Just try this:

  2. TypeError: worker() takes 0 positional arguments but 1 was given

    To Fix TypeError: worker() takes 0 positional arguments but 1 was given Error just Run this code. Add self in your code just like below example: class KeyStatisticCollection(DataDownloadUtilities.DataDownloadCollection): def GenerateAddressStrings(self): pass def worker(self): pass def DownloadProc(self): pass

Solution 1 : Add self

You just have to add self as a parameter in your worker method in KeyStatisticCollection. By adding this you can solve your error. Just try this:

Solution 2 : Run this code

Add self in your code just like below example:

class KeyStatisticCollection(DataDownloadUtilities.DataDownloadCollection):
def GenerateAddressStrings(self):
    pass    
def worker(self):
    pass
def DownloadProc(self):
    pass

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment