Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'format_exc' #178

Open
IamMohitM opened this issue Jan 7, 2019 · 0 comments
Open

ImportError: cannot import name 'format_exc' #178

IamMohitM opened this issue Jan 7, 2019 · 0 comments

Comments

@IamMohitM
Copy link

IamMohitM commented Jan 7, 2019

I'm trying to run the main.py file and I get an Import error:

ImportError: cannot import name 'format_exc'

After some research from stackoverflow and other similar github issue, I find that this could be a file name conflict in the project. Here is the Exception Traceback:

Traceback (most recent call last):
  File "C:/Users/mohit.motwani/AppData/Local/Continuum/anaconda3/Lib/site-packages/polyglot-16.7.4-py3.6.egg/polyglot/__main__.py", line 13, in <module>
    import logging
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\lib\logging\__init__.py", line 26, in <module>
    import sys, os, time, io, traceback, warnings, weakref, collections
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\lib\traceback.py", line 5, in <module>
    import linecache
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\lib\linecache.py", line 11, in <module>
    import tokenize
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\Lib\site-packages\polyglot-16.7.4-py3.6.egg\polyglot\tokenize\__init__.py", line 4, in <module>
    from .base import WordTokenizer, SentenceTokenizer
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\Lib\site-packages\polyglot-16.7.4-py3.6.egg\polyglot\tokenize\base.py", line 7, in <module>
    from polyglot.base import Sequence
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\lib\site-packages\polyglot-16.7.4-py3.6.egg\polyglot\__init__.py", line 12, in <module>
    from .base import Sequence, TokenSequence
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\lib\site-packages\polyglot-16.7.4-py3.6.egg\polyglot\base.py", line 9, in <module>
    from concurrent.futures import ProcessPoolExecutor
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\lib\concurrent\futures\__init__.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\lib\concurrent\futures\_base.py", line 8, in <module>
    import threading
  File "C:\Users\mohit.motwani\AppData\Local\Continuum\anaconda3\lib\threading.py", line 7, in <module>
    from traceback import format_exc as _format_exc
ImportError: cannot import name 'format_exc'

I can see that there is only one traceback.py in my anaconda folder and I can't find any other traceback file to confirm if this is a name conflict. I don't know where the problem is and how to fix this Import Error. Any help will be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant