lbryio / lbryio/lbry-sdk

Startup error in get_linux_directories

Open
#2,291 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs: repro type: bug
Dominant language
Python
Stars
7.2k
Forks
493
PR merge metrics
No merged PRs in 30d

Description

When starting LBRY-0.33.2 the first time on Ubuntu 19.04, I get the following message during startup:

The daemon may have encountered an unexpected error, or another daemon instance is already running.

The log file does not exist, but the console has the following output:

Starting SDK
Sandbox listening on port 5278.
Daemon: [17050] Failed to execute script cli

Daemon: Traceback (most recent call last):
  File "lbrynet/extras/cli.py", line 322, in <module>
  File "lbrynet/extras/cli.py", line 229, in main
  File "lbrynet/conf.py", line 400, in create_from_arguments
  File "lbrynet/conf.py", line 570, in __init__
  File "lbrynet/conf.py", line 582, in set_default_paths
  File "lbrynet/conf.py", line 621, in get_linux_directories
AttributeError: 'NoneType' object has no attribute 'group'

I tried manually creating the ~/.config/LBRY/user-dirs.dirs according to the code that tries to read it, but the exception is still the same.

I'm running Python 3.7.3, which has FileNotFoundError inherit from OSError instead of EnvironmentError, but this was apparently changed in 3.3 so already a long time ago. Does LBRY bundle it's own python interpreter?

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

Start in lbrynet/conf.py around get_linux_directories at line 621, then follow set_default_paths and the user-dirs.dirs handling described in the traceback. Reproduce startup on Ubuntu 19.04 with Python 3.7.3 and verify that the daemon starts without the NoneType group error.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.