I run my code in Jupyter-notebook and it tracesback an error to an older file version (the actual file does not have the error code inside anymore)
I updated ipython, I tried to relaunched Jupyter, I reopened the (previously erroneuos) file, and restarted the whole computer. Nothing works!
This is the traceback error:
TypeError Traceback (most recent call last)
<ipython-input-34-b46c17b92e93> in batchGenerator(self, DG_list, batch_size, output_format)
233 batches = []
234 for DG in DG_list:
--> 235 batches.append(DG.generate(batchIDs,output_format))
236 yield tuple(batches) # match output type to keras fit_generator generator function
237
~\PycharmProjects\MMOP\ADT\DataGeneratorADT.py in generate(self, IDList, outputFormat)
222 if header != self._DUF_columns:
223 warnings.warn('The DUF header is not consistent with the DG setting. It is now set to:',
--> 224 header)
225 self._DUF_columns = header
226 list_reader = list(reader)
TypeError: category must be a Warning subclass, not 'list'
And this is the actual code in the file (when loaded in Jupyter):
file = open('DataGeneratorADT.py','r')
content = file.read()
print(content)
if header != self._DUF_columns:
print('The DUF header is not consistent with the DG setting. It is now set to:' + header)
self._DUF_columns = header
I expect to have to error about the Warning since I deleted it and replaced it by print.
Seems that 2 problems caused this error:
git gc
. The above command removes temp and unnecessary files. (Garbage collector)