0

I am trying to run a file on python but the following error message is getting rendered:

Error reading or writing history file 'C:\Users\ibrah\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt': Access to the path 'C:\Users\ibrah\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt' is denied.

The line I am entering is the following:

py "C:\Users\ibrah\AppData\Local\Programs\Python\Python312\Waterfall Chart 2.py"

Does anyone has any idea about the issue that could be causing this error message to be displayed?

Greetings!

4
  • Said path is where PowerShell's PSReadLine module persists the history of interactively typed commands, and the current user should normally have full access to that file. You'll need to investigate why your permissions are different and restore them.
    – mklement0
    Commented Jun 28 at 16:26
  • User/jbrah path only the admin and the user can read/write the file.
    – jdweng
    Commented Jun 28 at 19:47
  • Thank you for your answer. I tried the code line another time after rebooting the computer and another error message is rendered: [Errno 2] No such file or directory, while the file path is 100% correct. Commented Jun 30 at 19:17
  • There's definitely something unusual going on, but without additional information I doubt anybody will be able to help. Have you tried recreating the file and its folder? New-Item -Force C:\Users\ibrah\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
    – mklement0
    Commented Jun 30 at 19:56

0

Browse other questions tagged or ask your own question.