Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not collect Django data #64

Open
thibaudcolas opened this issue Nov 13, 2024 · 2 comments
Open

Could not collect Django data #64

thibaudcolas opened this issue Nov 13, 2024 · 2 comments

Comments

@thibaudcolas
Copy link

thibaudcolas commented Nov 13, 2024

I can’t get any completions / the language server to work because it fails to retrieve local project data. Here are the relevant logs, where bakerydemo is the root of the Django project:

Collection django data from local python path: bakerydemo/venv/bin/python
Collector command: bakerydemo/venv/bin/python pipx/venvs/django-template-lsp/lib/python3.12/site-packages/djlsp/scripts/django-collector.py --project-src=bakerydemo
Command '['bakerydemo/venv/bin/python', 'pipx/venvs/django-template-lsp/lib/python3.12/site-packages/djlsp/scripts/django-collector.py', '--project-src=bakerydemo']' returned non-zero exit status 1.
Could not collect Django data

It’s hard to tell what exactly the error might be when executing that command within the VS Code context. Trying to run django-collector.py manually, I’ve had some success, but have no idea why it might be failing within the extension.

The output I get when it succeeds starts with:

could not find class definition
could not find class definition
could not find class definition
could not find class definition
Failed to parse library (base): 'base'
@rubenhesselink
Copy link
Contributor

Thank you for submitting this issue, we are currently looking into this problem.

@krukas
Copy link
Contributor

krukas commented Nov 18, 2024

@thibaudcolas I cloned bakerydemo and datacollect works for me when manually set the Django settings (the have a different manage.py file to what Django creates and auto detect doesn't work).

What do you have configured in VScode and did you make changes to the project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants