Skip to content

ERROR #4729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
M99994 opened this issue May 2, 2025 · 2 comments
Closed
3 tasks done

ERROR #4729

M99994 opened this issue May 2, 2025 · 2 comments

Comments

@M99994
Copy link

M99994 commented May 2, 2025

Prerequisites

Exception report

-----------------------------------------------------------------------
Last 1 Keys:
 &

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: left
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\ML> & C:/Users/ML/AppData/Local/Programs/Python/Python313/python.exe Untitled-3
C:\Users\ML\AppData\Local\Programs\Python\Python313\python.exe: can't open file 'C:\\Users\\ML\\Untitled-3': [Errno 2] No such file or directory
PS C:\Users\ML> import requests
>> from bs4 import BeautifulSoup
>> import pandas as pd
>>
>> # Step 1: Send request
>> url = "http://quotes.toscrape.com/"
>> response = requests.get(url)
>>
>> # Step 2: Parse HTML
>> soup = BeautifulSoup(response.text, "html.parser")    
>> quotes = soup.find_all("div", class_="quote")
>>
>> # Step 3: Extract data into a list
>> data = []
>> for quote in quotes:
>>     text = quote.find("span", class_="text").text     
>>     author = quote.find("small", class_="author").text
>>     data.append({"Quote": text, "Author": author})    
>>
>> # Step 4: Convert to DataFrame and save as CSV        
>> df = pd.DataFrame(data)
>> df.to_csv("quotes.csv", index=False)
>>
>> print("? Quotes saved to quotes.csv")
>> import requests
>> from bs4 import BeautifulSoup
>> import pandas as pd
>>
>> # Step 1: Send request
>> url = "http://quotes.toscrape.com/"
>> response = requests.get(url)
>>
>> # Step 2: Parse HTML
>> soup = BeautifulSoup(response.text, "html.parser")
>> quotes = soup.find_all("div", class_="quote")
>> 
>> # Step 3: Extract data into a list
>> data = []
>> for quote in quotes:
>>     text = quote.find("span", class_="text").text
>>     author = quote.find("small", class_="author").text
>>     data.append({"Quote": text, "Author": author})
>>
>> # Step 4: Convert to DataFrame and save as CSV
>> df = pd.DataFrame(data)
>> df.to_csv("quotes.csv", index=False)
>> 
>> print("? Quotes saved to quotes.csv")
>>
Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 79 Keys:
 & Space C : / U s e r s / M L / 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 3 / p y t h o n . e x e Space U n t i t l e d - 3 Enter
 Ctrl+v Ctrl+v Ctrl+v

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 -16.
   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.Paste(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\ML> import requests
>> from bs4 import BeautifulSoup
>> import pandas as pd
>>
>> # Step 1: Send request
>> url = "http://quotes.toscrape.com/"
>> response = requests.get(url)
>> 
>> # Step 2: Parse HTML
>> soup = BeautifulSoup(response.text, "html.parser")
>> quotes = soup.find_all("div", class_="quote")
>> 
>> # Step 3: Extract data into a list
>> data = []
>> for quote in quotes:
>>     text = quote.find("span", class_="text").text
>>     author = quote.find("small", class_="author").text
>>     data.append({"Quote": text, "Author": author})
>>
>> # Step 4: Convert to DataFrame and save as CSV
>> df = pd.DataFrame(data)
>> df.to_csv("quotes.csv", index=False)
>>
>> print("? Quotes saved to quotes.csv")
>> import requests
>> from bs4 import BeautifulSoup
>> import pandas as pd
>>
>> # Step 1: Send request
>> url = "http://quotes.toscrape.com/"
>> response = requests.get(url)
>>
>> # Step 2: Parse HTML
>> soup = BeautifulSoup(response.text, "html.parser")
>> quotes = soup.find_all("div", class_="quote")
>> 
>> # Step 3: Extract data into a list
>> data = []
>> for quote in quotes:
>>     text = quote.find("span", class_="text").text
>>     author = quote.find("small", class_="author").text
>>     data.append({"Quote": text, "Author": author})
>>
>> # Step 4: Convert to DataFrame and save as CSV
>> df = pd.DataFrame(data)
>> df.to_csv("quotes.csv", index=False)
>>
>> print("? Quotes saved to quotes.csv")
>> import requests
>> from bs4 import BeautifulSoup
>> import pandas as pd
>>
>> # Step 1: Send request
>> url = "http://quotes.toscrape.com/"
>> response = requests.get(url)
>>
>> # Step 2: Parse HTML
>> soup = BeautifulSoup(response.text, "html.parser")
>> quotes = soup.find_all("div", class_="quote")
>>
>> # Step 3: Extract data into a list
>> data = []
>> for quote in quotes:
>>     text = quote.find("span", class_="text").text
>>     author = quote.find("small", class_="author").text
>>     data.append({"Quote": text, "Author": author})
>>
>> # Step 4: Convert to DataFrame and save as CSV
>> df = pd.DataFrame(data)
>> df.to_csv("quotes.csv", index=False)
>>
>> print("? Quotes saved to quotes.csv")
>>

Screenshot

Image
Image
Image
Image
Image
Image
Image

Image
Image

Environment data

PYTHON 3.13

Steps to reproduce

I JUST WROTE A CODE TIS CAN SHOW

Expected behavior

NO COMMENT

Actual behavior

ITS SHOWS AERROR

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label May 2, 2025
@M99994
Copy link
Author

M99994 commented May 2, 2025

HOW I FIX IT

Copy link

github-actions bot commented May 2, 2025

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.

@github-actions github-actions bot closed this as completed May 2, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant