The error is in Primes.__main__()
- you need to pass an instance like
Primes.__main__(self)
or Primes.__main__(primes)
but for a full answer you would have to show the full code.
It is not a good idea to do
Primes = Primes()
before that statement, Primes is a class (or maybe a function), afterwards it is an instance. Better say
primes = Primes()