question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to initialize knowledge repo

See original GitHub issue

Hello,

I am attempting to spin up knowledge repo locally. So far, I have:

  • Created and activated virtual environment
  • pip install --upgrade "knowledge-repo[all]"

Yet, when I follow the next command:

knowledge_repo --repo C:\Users\sperkins\Projects\repo init

I get the error:

Traceback (most recent call last): File “C:\Users\sperkins\Projects\repo\repo-env\Scripts\knowledge_repo”, line 96, in <module> repo = knowledge_repo.KnowledgeRepository.for_uri(args.repo) File “c:\users\sperkins\projects\repo\repo-env\lib\site-packages\knowledge_repo\repository.py”, line 46, in for_uri return cls._get_subclass_for(scheme)(uri, *args, **kwargs) File “c:\users\sperkins\projects\repo\repo-env\lib\site-packages\knowledge_repo\utils\registry.py”, line 24, in _get_subclass_for return cls._registry[key] KeyError: ‘c’

Am I missing something?

Auto-reviewers: @NiharikaRay @matthewwardrop @earthmancash @danfrankj

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
brunamnccommented, Jul 13, 2018

@stephperk try using a relative path instead of an absolute path, such as:

knowledge_repo --repo .\test init

I was having the same issue as you but this worked for me. Hope this helps!

2reactions
ppeiriscommented, Oct 3, 2021

I got this error when I try to launch the server.

Traceback (most recent call last):
  File "/path/to/my/repo", line 263, in <module>
    raise RuntimeError("Could not initialise knowledge repository for uri `{}`. Please check the uri, and try again.".format(args.repo))
RuntimeError: Could not initialise knowledge repository for uri `/path/to/my/repo`. Please check the uri, and try again.

Solution:

The issue was I was not initializing the repo correctly.

this is how I initialize the repo (and this is the wrong way to do it)

knowledge_repo --repo /path/to/my/repo init

Even this is wrong, it did not give me any errors and created the dir with .knowledge_repo_config.yml file, so I thought it was created properly

The CORRECT way to initialize it

knowledge_repo --repo git:///path/to/my/repo init

Please not the git:// and then the path to the location on your machine.

After creating the repo this way, I was able to run the server.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git - Can't initialize new repository - Stack Overflow
To initialize a Git repository you need to complete the following steps: 1. In the Projects window, select an unversioned project and ...
Read more >
Deployment — Knowledge Repo v0.9.1 documentation
A knowledge repository (or repositories) must be created. These repositories are where knowledge posts are pooled and made accessible to users.
Read more >
Setting up Knowledge repo - Daniel Perez
First, we will install Knowledge repo and try to run the server. pip install knowledge_repo[all] export KNOWLEDGE_REPO="<repo_path>" ...
Read more >
Informatica services fail to start with "[[RSVCSHARED_00014 ...
May 14, 2022•Knowledge 000157687 ... The Repository Capability ['Persistence'] failed to initialize for the following reason: ...
Read more >
Unable to create a Data Services repository during Installation
Unable to create a repository during the installation of Data Services Receive the following error message: " The database connection has failed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found