ironpython2 icon indicating copy to clipboard operation
ironpython2 copied to clipboard

help() function won't work

Open Infixz opened this issue 4 years ago • 4 comments

Prerequisites

The issue tracker is used to report bugs and request new features, NOT to ask questions.

Questions should be posted to the users mailing list which can be accessed at https://ironpython.groups.io/g/users.

  • [x] Are you running the latest version? yes, it's .net core 3.1 runing netcoreapp3.1_ipy
  • [x] Are you reporting to the correct repository? yes
  • [x] Did you perform a cursory search? yes

Description

[Description of the bug or feature] help(built-in type) and it raised an exception ( IOError)

Steps to Reproduce

System.Collections.ArrayList
<type 'ArrayList'> help(System.Collections.ArrayList) Traceback (most recent call last): File "", line 1, in File "/home/chengs/IronPython.2.7.10/Lib/site.py", line 450, in call File "/home/chengs/IronPython.2.7.10/Lib/pydoc.py", line 1796, in call File "/home/chengs/IronPython.2.7.10/Lib/pydoc.py", line 1834, in help File "/home/chengs/IronPython.2.7.10/Lib/pydoc.py", line 1579, in doc File "/home/chengs/IronPython.2.7.10/Lib/pydoc.py", line 1375, in pager File "/home/chengs/IronPython.2.7.10/Lib/pydoc.py", line 1384, in getpager IOError: [Errno 2] Could not load file or assembly 'Mono.Posix.NETStandard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

System.Collections.ArrayList.doc 'ArrayList()\nArrayList(capacity: int)\nArrayList(c: ICollection)\n'

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions

You can get this information from executing ipy -V. IronPython 2.7.10 (2.7.10.1000) [.NETCoreApp,Version=v3.1 on .NET Core 3.1.3 (64-bit)]

Infixz avatar May 18 '20 15:05 Infixz

It looks like the Mono.Posix.NETStandard DLLs are not included in the zip file. Related to https://github.com/IronLanguages/ironpython2/pull/465

As a workaround you can download the nuget package linked above, unzip and place the Mono.Posix.NETStandard.dll for your runtime in the ipy folder.

slozier avatar May 18 '20 17:05 slozier

it worked after i place a .netstandard 2.0 version of this dll, but it idle a lot when use q to quit help() description doc.

Infixz avatar May 19 '20 00:05 Infixz

exception. System.PlatformNotSupportedException: Thread abort is not supported on this platform. at System.Threading.Thread.Abort(Object stateInfo) at Microsoft.Scripting.Hosting.Shell.BasicConsole.<.ctor>b__24_0(Object sender, ConsoleCancelEventArgs e) at Microsoft.Scripting.Hosting.Shell.BasicConsole.<.ctor>b__24_1(Object sender, ConsoleCancelEventArgs e) at System.Console.HandleBreakEvent(ConsoleSpecialKey controlKey) at System.ConsolePal.ControlCHandlerRegistrar.HandleBreakEvent(Object state) at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart(Object obj) ^C^CAborted (core dumped)

Infixz avatar May 19 '20 00:05 Infixz

Seems to be some sort of deadlock when calling Console.CursorTop. Might be the same issue described in https://github.com/dotnet/runtime/issues/34239

slozier avatar May 21 '20 19:05 slozier