Windows issue with get_paths and FOLDERID
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 493
- PR merge metrics
- No merged PRs in 30d
Description
## The Issue
The app crashes on a fresh install APPCRASH
Please see https://github.com/lbryio/lbry/issues/1970#issuecomment-480417753 for one reason this would crash. We need to fall back to a sane alternative if get_paths fails.
### Steps to reproduce
1. Install the app through the site
2. Start the app
### Expected behavior
App to actually launch ;)
### Actual behavior
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\DVD>cd C:\Program Files\LBRY
C:\Program Files\LBRY>LBRY.exe
C:\Program Files\LBRY>
Starting SDK
Sandbox listening on port 5278.
Daemon: [5804] Failed to execute script cli
Daemon: Traceback (most recent call last):
File "lbrynet\extras\cli.py", line 312, in
File "lbrynet\extras\cli.py", line 231, in main
File "lbrynet\conf.py", line 404, in create_from_arguments
File "lbrynet\conf.py", line 549, in __init__
File "lbrynet\conf.py", line 561, in set_default_paths
File "lbrynet\conf.py", line 574, in get_windows_directories
File "lbrynet\winpaths.py", line 152, in get_path
lbrynet.winpaths.PathNotFoundException
## System Configuration
- LBRY Daemon version: N/A
- LBRY App version: N/A
- LBRY Installation ID: N/A
- Operating system: Windows 7 Ultimate x64
## Anything Else

### Definition of Done
- [x] Tested against acceptance criteria
- [x] Tested against the assumptions of user story
- [ ] The project builds without errors
- [ ] Unit tests are written and passing
- [ ] Tests on devices/browsers listed in the issue have passed
- [ ] QA performed & issues resolved
- [ ] Refactoring completed
- [ ] Any configuration or build changes documented
- [ ] Documentation updated
- [ ] Peer Code Review performed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lbrynet/winpaths.py:get_path and the callers in lbrynet/conf.py, especially set_default_paths and get_windows_directories; review the linked comment for the FOLDERID failure. Reproduce the fresh-install launch on Windows 7 and verify that a failed get_path call falls back to a usable directory so the app launches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100