doccano / auto-labeling-pipeline

doccano auto labeling pipeline helps doccano to annotate a document automatically.
MIT License
39 stars 16 forks source link

`Literal` error while importing typing in line 2 #3

Closed SurajDonthi closed 3 years ago

SurajDonthi commented 3 years ago

Issue

Getting the following error when running latest doccano.

File "/usr/local/lib/python3.6/dist-packages/app/api/models.py", line 3, in <module>
    from auto_labeling_pipeline.models import RequestModelFactory
  File "/usr/local/lib/python3.6/dist-packages/auto_labeling_pipeline/models.py", line 2, in <module>
    from typing import Dict, Literal, Optional, Type
ImportError: cannot import name 'Literal'

Description

In the recent update to the typing module, Literal has been excluded & included in typing_extensions.

Fixes # (issue)

ImportError: cannot import name 'Literal'

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist: