polyenv
polyenv copied to clipboard
IndexError: list index out of range
I have tried:
echo "let mutable a =1" > 1.f#
python3 -m polyenv f# 1.f#
but I got
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/polyenv/__main__.py", line 3, in <module>
polyenv.run_main()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/polyenv/__init__.py", line 41, in run_main
main(sys.argv)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/polyenv/__init__.py", line 36, in main
output = run_programming_language(language, input_file)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/polyenv/__init__.py", line 19, in run_programming_language
response = tio.send(request)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytio/_Tio.py", line 68, in send
return self.send_bytes(fmt.as_deflated_bytes())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytio/_Tio.py", line 92, in send_bytes
return TioResponse(reqcode, fulldata, None)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytio/_TioResponse.py", line 29, in __init__
if self._splitdata[2] or self._splitdata[2] != b'':
IndexError: list index out of range
I am working on mac and using python 3.7.
Hello, @Victor-de-shtab Thank you for raising an issue.
The problem is that the F-Sharp extension is fs, not f#. Also, calling this language on polyenv is achieved by using fs-mono or fs-core (for .NET core).
I just called polyenv fs-mono 1.fs with the following content:
open System
[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
0 // return an integer exit code
And got:
Hello World from F#!
Did that help?