naturalness / javac-parser

Exposes OpenJDK's Java parser and scanner to Python
https://pypi.org/project/javac-parser/
GNU Affero General Public License v3.0
6 stars 4 forks source link

Fileno Error #3

Closed yaxirhuxxain closed 5 years ago

yaxirhuxxain commented 5 years ago

When i run the following command "java = javac_parser.Java()" i get this error.

Traceback (most recent call last):

File "", line 2, in java = javac_parser.Java()

File "C:\ProgramData\Anaconda3\lib\site-packages\javac_parser\javac_parser.py", line 88, in init redirect_stderr=sys.stderr)

File "C:\ProgramData\Anaconda3\lib\site-packages\py4j\java_gateway.py", line 313, in launch_gateway **popen_kwargs)

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 210, in init super(SubprocessPopen, self).init(*args, **kwargs)

File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 667, in init errread, errwrite) = self._get_handles(stdin, stdout, stderr)

File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 942, in _get_handles errwrite = msvcrt.get_osfhandle(stderr.fileno())

UnsupportedOperation: fileno

eddieantonio commented 5 years ago

Unfortunately, this is an issue in the library we use, py4j, which does not support Windows. fileno() is an operation that is only supported on Unix (Linux, macOS, etc.) devices. If possible, run javac-parser in Linux Subsystem for Windows, or a Linux virtualmachine. Sorry about that! :/