Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

"FileNotFoundError" exception raised on Windows

Open
#106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start in install-poetry.py at get_windows_path_var, called by display_post_message_windows, and reproduce the installer on Windows without administrator rights. Investigate the reported FileNotFoundError from winreg.QueryValueEx; done means the installation completes and the post-install message is displayed without this exception.

Written by the indexing model from the issue text.

Description

Hello,

Trying the installer on Windows (for a user that does not have administrator rights) and the installation fails:

C:\Users\foo-bar>rez-env python -- python C:\Users\foo-bar\Downloads\install-poetry.py
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

C:\Users\foo-bar\AppData\Roaming\Python\Scripts

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.3.2)
Installing Poetry (1.3.2): Creating environment
Installing Poetry (1.3.2): Installing Poetry
Installing Poetry (1.3.2): Creating script
Installing Poetry (1.3.2): Done

Traceback (most recent call last):
  File "C:\Users\foo-bar\Downloads\install-poetry.py", line 940, in <module>
    sys.exit(main())
  File "C:\Users\foo-bar\Downloads\install-poetry.py", line 919, in main
    return installer.run()
  File "C:\Users\foo-bar\Downloads\install-poetry.py", line 557, in run
    self.display_post_message(version)
  File "C:\Users\foo-bar\Downloads\install-poetry.py", line 686, in display_post_message
    return self.display_post_message_windows(version)
  File "C:\Users\foo-bar\Downloads\install-poetry.py", line 694, in display_post_message_windows
    path = self.get_windows_path_var()
  File "C:\Users\foo-bar\Downloads\install-poetry.py", line 718, in get_windows_path_var
    path, _ = winreg.QueryValueEx(key, "PATH")
FileNotFoundError: [WinError 2] The system cannot find the file specified

Cheers,

Thomas

Dominant language
Python
Stars
255
Forks
65
Avg merge
2h 48m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

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.

More from python-poetry/install.python-poetry.org

All issues in python-poetry/install.python-poetry.org

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.