Anomalous “object.__init__() takes exactly one argument” from a class that inherit from another

I cannot understand what can cause this anomalous call of object.__init__ I will really appreciate a help.

Here the code. I’m including all the code, except for useless text because I don’t know what cause the error

class IdXY(bclasses.GenStructData):
  _dtype_names=('idx', 'x', 'y');
  _dtype_formats=(str, float, float);
  _dtype_delimiter=' ';
  _str_format="{idx:>12} {x:10f} {y:10f}";

  (idx,idn, x,y)='-',0, 0.,0.;

  def _check_def(self, check_value=True):
    """Function to check if the class is defined correctly
    _name_='IdXY object';
    if(self._dtype_nlines!=1): raise ValueError(_name_+": `_dtype_nlines` for this king of object can be just 1. Use the multi-lines version");
    if(not self.withid):
      if('idx' in self._dtype_names):
        else: raise SkZpipeError(_name_+"...", exclocus=_name_);
    super()._check_def(check_value=check_value); #=>bclasses.GenStructData

  def __init__(self, data=None, withid=None, idn=0):
    """IdXY object with 2D coordinates and eventually an ID.
    _name_='IdXY object';
    if(data is None): raise ValueError(_name_+": No data to create the object");
    if(withid is not None): self.withid=withid;

    print(self.__class__.__mro__, flush=True); #added to check

Then there is not important code. Running I got:

> IdXY("1 2 3")
(<class 'skzpipe.parameters.classes.fileclass.basefile.IdXY'>, <class 'skzpipe.parameters.classes.bclasses.GenStructData'>, <class 'object'>)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/skz/SkZ_pipeline/SkZpipe/skzpipe/parameters/classes/fileclass/", line 562, in __init__
TypeError: object.__init__() takes exactly one argument (the instance to initialize)

Why does the code jump to object.__init__() instead of executing GenStructData.__init__()? GenStructData doesn’t use super.

Something is anomalous because:

> issubclass(skzpipe.parameters.classes.fileclass.basefile.IdXY,
> skzpipe.parameters.classes.bclasses.GenStructData) 
> False

And I defined IdXY as a subclass of GenStructData. But:

> skzpipe.parameters.classes.fileclass.basefile.IdXY.__mro__
> (<class 'skzpipe.parameters.classes.fileclass.basefile.IdXY'>, <class 'skzpipe.parameters.classes.bclasses.GenStructData'>, <class 'object'>)

EDIT: GenStructData has a __init__

class GenStructData():
    _dtype_names=((), ());
    _dtype_formats=((), )*_dtype_nlines;
    _dtype_nfield=tuple(len(x) for x in _dtype_names);
    _str_format=("", "");
    _str_len=(None, None);

    def _check_def(self, check_value=True):

  def __init__(self, data=None, check_default=True, attributes=None):
    """An object from multi-lined structured data. This is not a class for direct use.""";
    _name_='GenStructData object';
    if(data is None or not isinstance(data,(str,list,tuple,GenStructData,numpy.ndarray))):
       raise TypeError(_name_+": Wrong type for `data` to create the object <{data}>".format(data=data));
    if(not self._dtype_datanames): 


The cause was a no pythonic way to solve an Attribute Error caused by nested imports. (where GenStructData is defined) started with

"""Generic classes.""";

 import os, re, math, io, copy;
 import multiprocessing as multiprc;
 import psutil, numpy;
 from sys import stdout, stderr;

 #Predefinition to avoid Attribute Error
 class GenStructData:

 from ...exceptions import *
 from .. import basicpar as bpar
 from .. import options as _opt
 from ... import functions as funct

Moving from ... import functions as funct inside the 2 part of the code that use it (as it should be done, actually) and removing the empty definition solved the problem

skzpipe.parameters.classes.fileclass.basefile.IdXY(“1 2 3”)
1 2.000000 3.000000


The initial empty definition somehow messed up with the internal structure.
The anomaly is that also IdXY has a empty predefinition but its __init__ was called correctly