geekcomputers / geekcomputers/Python

can not excute this script

Open
#32 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
35.4k
Forks
12.9k
Avg merge
2h 37m
Merged PRs (30d)
1

Description

import shownfile#i have named this script
Enter a file name: r'c:\python27\showfile.py'
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\showfile.py", line 18, in
file_stats = os.stat(file_name)
WindowsError: [Error 123] : "r'c:\python27\showfile.py'"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect C:\Python27\showfile.py, especially line 18 where os.stat(file_name) is called, and review how the filename is entered. Reproduce the failure with the supplied input under Python 2.7 on Windows. Done means the intended file path is processed without the reported WindowsError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.