question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: metaclass conflict (problem with tfaip?)

See original GitHub issue

Hello!

I’m not sure if I’m missing something, but as there has already been a problem with tfaip (#205), I wanted to point out an issue I’m struggling with when installing the latest version of calamari.

Here my output. Any hints welcome, the hack provided in the above-mentioned issue does not work.

 user@user:~/virtualenvs/calamari_2-1-1/calamari(master)$ calamari-train --version
Traceback (most recent call last):
  File "/home/user/virtualenvs/calamari_2-1-1/bin/calamari-train", line 33, in <module>
    sys.exit(load_entry_point('calamari-ocr==2.1.1', 'console_scripts', 'calamari-train')())
  File "/home/user/virtualenvs/calamari_2-1-1/bin/calamari-train", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/user/virtualenvs/calamari_2-1-1/lib/python3.6/site-packages/importlib_metadata-4.0.1-py3.6.egg/importlib_metadata/__init__.py", line 166, in load
    module = import_module(match.group('module'))
  File "/home/user/virtualenvs/calamari_2-1-1/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/user/virtualenvs/calamari_2-1-1/lib/python3.6/site-packages/calamari_ocr-2.1.1-py3.6.egg/calamari_ocr/scripts/train.py", line 5, in <module>
    from tfaip.util.logging import logger, WriteToLogFile
  File "/home/user/virtualenvs/calamari_2-1-1/lib/python3.6/site-packages/tfaip-1.1.1-py3.6.egg/tfaip/__init__.py", line 37, in <module>
    from tfaip.scenario.scenariobaseparams import ScenarioBaseParams
  File "/home/user/virtualenvs/calamari_2-1-1/lib/python3.6/site-packages/tfaip-1.1.1-py3.6.egg/tfaip/scenario/scenariobaseparams.py", line 48, in <module>
    class ScenarioBaseParams(Generic[TDataParams, TModelParams], ABC, metaclass=ScenarioBaseParamsMeta):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ChWickcommented, May 17, 2021

calamari 1 requires tensorflow 2.1 (maximum 2.2)

1reaction
ChWickcommented, May 17, 2021

The bug-fix can be integrated in the calamar/1.0 branch, however I generally do not want to maintain old releases since this would consume much more time…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolving metaclass conflicts - python - Stack Overflow
Heres your problem: The base class has a metaclass that is not the same type as the subclass. That is why you get...
Read more >
SOLVING THE METACLASS CONFLICT
Here I give a general recipe to solve the problem, as well as some theory and ... TypeError: metaclass conflict: the metaclass of...
Read more >
Metaclass conflict when doing createmigrations in ModelState ...
In my project I'm using few ModelMixins with custom __metadata__ , problem is that render is trying do a class using type but...
Read more >
python metaclass conflict/type error - splunktool
I'm not sure if I'm missing something, but as there has already been a problem with tfaip (#205), I wanted to point out...
Read more >
the metaclass of a derived class must be a (non-strict ...
Single inheritance causes TypeError: metaclass conflict: the metaclass of a ... This should give you exactly what you want, without any error mesages....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found