PowerShell / PSReadLine

A bash inspired readline implementation for PowerShell
BSD 2-Clause "Simplified" License
3.77k stars 298 forks source link

i am not able to run my python file of finding factorial of a number using while loop #4162

Closed rkr2303 closed 2 months ago

rkr2303 commented 2 months ago

Prerequisites

Exception report

Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 200 Keys:
 t h o n _ B a s i c s / c h a i _ a u r _ p y t h o n / s t r i n g _ q u e / s o l _ 6 . p y " Enter
 & Space " C : / U s e r s / R a k e s h Space k u m a r / A p p D a t a / L o c a l / P r o g r a m s / P y t h o n / P y t h o n 3 1 1 / p y t h o n . e x e " Space " c : / U s e r s / R a k e s h Space k u m a r / P y t h o n _ B a s i c s / c h a i _ a u r _ p y t h o n / s t r i n g _ q u e / s o l _ 6 . p y " Enter

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.    
Parameter name: top
Actual value was -7.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)  
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
PS C:\Users\Rakesh kumar\Python_Basics> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Py& "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6_factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6_factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.p
Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 200 Keys:
 t h o n _ B a s i c s / c h a i _ a u r _ p y t h o n / s t r i n g _ q u e / s o l _ 6 . p y " Enter
 & Space " C : / U s e r s / R a k e s h Space k u m a r / A p p D a t a / L o c a l / P r o g r a m s / P y t h o n / P y t h o n 3 1 1 / p y t h o n . e x e " Space " c : / U s e r s / R a k e s h Space k u m a r / P y t h o n _ B a s i c s / c h a i _ a u r _ p y t h o n / s t r i n g _ q u e / s o l _ 6 . p y " Enter

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.    
Parameter name: top
Actual value was -7.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)  
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
PS C:\Users\Rakesh kumar\Python_Basics> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Py& "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6_factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6_factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py
Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 200 Keys:
 t h o n _ B a s i c s / c h a i _ a u r _ p y t h o n / s t r i n g _ q u e / s o l _ 6 . p y " Enter
 & Space " C : / U s e r s / R a k e s h Space k u m a r / A p p D a t a / L o c a l / P r o g r a m s / P y t h o n / P y t h o n 3 1 1 / p y t h o n . e x e " Space " c : / U s e r s / R a k e s h Space k u m a r / P y t h o n _ B a s i c s / c h a i _ a u r _ p y t h o n / s t r i n g _ q u e / s o l _ 6 . p y " Enter

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.    
Parameter name: top
Actual value was -7.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)  
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
PS C:\Users\Rakesh kumar\Python_Basics> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Py& "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6_factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6_factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 200 Keys:
 t h o n _ B a s i c s / c h a i _ a u r _ p y t h o n / s t r i n g _ q u e / s o l _ 6 . p y " Enter
 & Space " C : / U s e r s / R a k e s h Space k u m a r / A p p D a t a / L o c a l / P r o g r a m s / P y t h o n / P y t h o n 3 1 1 / p y t h o n . e x e " Space " c : / U s e r s / R a k e s h Space k u m a r / P y t h o n _ B a s i c s / c h a i _ a u r _ p y t h o n / s t r i n g _ q u e / s o l _ 6 . p y " Enter

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.    
Parameter name: top
Actual value was -7.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.AcceptLineImpl(Boolean validate)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)  
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
PS C:\Users\Rakesh kumar\Python_Basics> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Py& "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6-factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6_factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6_factorial.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>> & "C:/Users/Rakesh kumar/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Rakesh kumar/Python_Basics/chai_aur_python/string_que/sol_6.py"
>>

Screenshot

Screenshot (165)

Environment data

i don't know any detail of version
i think it's python 3.12

Steps to reproduce

unexpected

Expected behavior

i don't know

Actual behavior

it should ask for a number to find its factorial

github-actions[bot] commented 2 months ago

This issue was already fixed (see #1306). Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery. See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.