PowerShell / PSReadLine

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

get unexpected and unwanted error #4221

Closed Ayushffmax closed 1 month ago

Ayushffmax commented 1 month ago

Prerequisites

Exception report

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Actual value was -2.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
   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\mytra\Documents\demo> & c:/Users/mytra/Documents/demo/.venv/Scripts/python.exe c:/Users/mytra/Documents/demo/aajj/hh.py

DevTools listening on ws://127.0.0.1:65294/devtools/browser/f2deadd1-75f6-4cc2-97ed-81ad27cef5bc
Traceback (most recent call last):
  File "c:\Users\mytra\Documents\demo\aajj\hh.py", line 10, in <module>
    elem = browser.find_element(By.NAME, 'p')  # Find the search box
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mytra\Documents\demo\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 748, in find_element
    return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mytra\Documents\demo\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 354, in execute
    self.error_handler.check_response(response)
  File "C:\Users\mytra\Documents\demo\.venv\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="p"]"}
  (Session info: chrome=129.0.6668.101); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
        GetHandleVerifier [0x00007FF67164B095+29557]
        (No symbol) [0x00007FF6715BFA50]
        (No symbol) [0x00007FF67147B56A]
        (No symbol) [0x00007FF6714CF695]
        (No symbol) [0x00007FF6714CF8EC]
        (No symbol) [0x00007FF67151B777]
        (No symbol) [0x00007FF6714F71CF]
        (No symbol) [0x00007FF67151851C]
        (No symbol) [0x00007FF6714F6F33]
        (No symbol) [0x00007FF6714C116F]
        (No symbol) [0x00007FF6714C22D1]
        GetHandleVerifier [0x00007FF67197C96D+3378253]
        GetHandleVerifier [0x00007FF6719C8497+3688311]
        GetHandleVerifier [0x00007FF6719BD1CB+3642539]
        GetHandleVerifier [0x00007FF67170A6B6+813462]
        (No symbol) [0x00007FF6715CAB5F]
        (No symbol) [0x00007FF6715C6B74]
        (No symbol) [0x00007FF6715C6D10]
        (No symbol) [0x00007FF6715B5C1F]
        BaseThreadInitThunk [0x00007FFBD17B7374+20]
        RtlUserThreadStart [0x00007FFBD19FCC91+33]

Screenshot

n

Environment data

n

Steps to reproduce

n

Expected behavior

n

Actual behavior

n

github-actions[bot] commented 1 month 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.