UnsupportedOperation: fileno - import spacy #11302
Answered
by
ljvmiranda921
KhalidAlghamdi8
asked this question in
Help: Installation
-
I installed spacy using anaconda conda install -c conda-forge spacy But I'm getting the error below when I'm importing them ---------------------------------------------------------------------------
UnsupportedOperation Traceback (most recent call last)
c:\Users\kalgh\Desktop\self-learing\NLP\The Witcher Network.ipynb Cell 1 in <cell line: 3>()
[1](vscode-notebook-cell:/c%3A/Users/kalgh/Desktop/self-learing/NLP/The%20Witcher%20Network.ipynb#W0sZmlsZQ%3D%3D?line=0) import pandas as pd
[2](vscode-notebook-cell:/c%3A/Users/kalgh/Desktop/self-learing/NLP/The%20Witcher%20Network.ipynb#W0sZmlsZQ%3D%3D?line=1) import numpy as np
----> [3](vscode-notebook-cell:/c%3A/Users/kalgh/Desktop/self-learing/NLP/The%20Witcher%20Network.ipynb#W0sZmlsZQ%3D%3D?line=2) import spacy
[4](vscode-notebook-cell:/c%3A/Users/kalgh/Desktop/self-learing/NLP/The%20Witcher%20Network.ipynb#W0sZmlsZQ%3D%3D?line=3) from spacy import displacy
[5](vscode-notebook-cell:/c%3A/Users/kalgh/Desktop/self-learing/NLP/The%20Witcher%20Network.ipynb#W0sZmlsZQ%3D%3D?line=4) import networkx as nx
File c:\Users\kalgh\anaconda3\envs\tf\lib\site-packages\spacy\__init__.py:11, in <module>
8 setup_default_warnings() # noqa: E402
10 # These are imported as part of the API
---> 11 from thinc.api import prefer_gpu, require_gpu, require_cpu # noqa: F401
12 from thinc.api import Config
14 from . import pipeline # noqa: F401
File c:\Users\kalgh\anaconda3\envs\tf\lib\site-packages\thinc\__init__.py:5, in <module>
2 import numpy
4 from .about import __version__
----> 5 from .config import registry
File c:\Users\kalgh\anaconda3\envs\tf\lib\site-packages\thinc\config.py:13, in <module>
11 from pydantic.main import ModelMetaclass
12 from pydantic.fields import ModelField
---> 13 from wasabi import table
14 import srsly
15 import catalogue
File c:\Users\kalgh\anaconda3\envs\tf\lib\site-packages\wasabi\__init__.py:12, in <module>
9 from .util import MESSAGES # noqa
10 from .about import __version__ # noqa
---> 12 msg = Printer()
File c:\Users\kalgh\anaconda3\envs\tf\lib\site-packages\wasabi\printer.py:56, in Printer.__init__(self, pretty, no_print, colors, icons, line_max, animation, animation_ascii, hide_animation, ignore_warnings, env_prefix, timestamp)
54 self.pretty = pretty and not env_no_pretty
55 self.no_print = no_print
---> 56 self.show_color = supports_ansi() and not env_log_friendly
57 self.hide_animation = hide_animation or env_log_friendly
58 self.ignore_warnings = ignore_warnings
File c:\Users\kalgh\anaconda3\envs\tf\lib\site-packages\wasabi\util.py:264, in supports_ansi()
262 if "ANSICON" in os.environ:
263 return True
--> 264 return _windows_console_supports_ansi()
266 return True
File c:\Users\kalgh\anaconda3\envs\tf\lib\site-packages\wasabi\util.py:236, in _windows_console_supports_ansi()
233 if not ok:
234 raise ctypes.WinError()
--> 236 console = msvcrt.get_osfhandle(sys.stdout.fileno())
237 try:
238 # Try to enable ANSI output support
239 flags = GetConsoleMode(console)
File c:\Users\kalgh\anaconda3\envs\tf\lib\site-packages\ipykernel\iostream.py:311, in OutStream.fileno(self)
309 return self._original_stdstream_copy
310 else:
--> 311 raise io.UnsupportedOperation("fileno")
UnsupportedOperation: fileno |
Beta Was this translation helpful? Give feedback.
Answered by
ljvmiranda921
Aug 15, 2022
Replies: 1 comment 1 reply
-
Hi @KhalidAlghamdi8 , this seems related to #11236 We're currently working on a fix (c.f. explosion/wasabi#25) as this seems to be an issue for the latest release of |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ljvmiranda921
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @KhalidAlghamdi8 , this seems related to #11236
We're currently working on a fix (c.f. explosion/wasabi#25) as this seems to be an issue for the latest release of
wasabi
. In the meantime, can you try the suggested fix to downgradewasabi
withpip install wasabi==0.9.1
?