Skip to content

ERROR #4729

Closed
Closed
ERROR#4729
@M99994

Description

@M99994

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions