I have installed RTD (from github master) as local private server. I have used "Installation guide" (http://read-the-docs.readthedocs.org/en/latest/install.html). I use sqlite temporarily.
I'm trying to make the build doc for pip and virtualenv. I'm getting an error:
[28/Apr/2014 03:35:09] "GET /projects/pip/ HTTP/1.1" 200 9197
[28/Apr/2014 03:35:16] "GET /dashboard/pip/edit/ HTTP/1.1" 200 13643
2014-04-28 03:35:42,724 - haystack.simple_backend - WARNING - update is not implemented in this backend
update is not implemented in this backend
[28/Apr/2014 03:35:42] WARNING [haystack.simple_backend:32] update is not implemented in this backend
[28/Apr/2014 03:35:42] ERROR [projects.models:295] failed to symlink project
Traceback (most recent call last):
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/models.py", line 293, in save
symlink(project=self.slug)
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 31, in symlink
v = version_from_slug(project, version)
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 26, in version_from_slug
v = Version.objects.get(project__slug=slug, slug=version)
File "/home/user/venvs/rtd/local/lib/python2.7/site-packages/django/db/models/manager.py", line 131, in get
return self.get_query_set().get(*args, **kwargs)
File "/home/user/venvs/rtd/local/lib/python2.7/site-packages/django/db/models/query.py", line 366, in get
% self.model._meta.object_name)
DoesNotExist: Version matching query does not exist.
Guessing this is an old version of the code? I don't see the call to
symlink in the projects/models.py file at all.
On Mon, Apr 28, 2014 at 1:51 AM, espdev [email protected] wrote:
I have installed RTD (from github master) as local private server. I have
used "Installation guide" (
http://read-the-docs.readthedocs.org/en/latest/install.html). I use sqlitetemporarily.I'm trying to make the build for pip and virtualenv. I'm getting an error:
[28/Apr/2014 03:35:09] "GET /projects/pip/ HTTP/1.1" 200 9197
[28/Apr/2014 03:35:16] "GET /dashboard/pip/edit/ HTTP/1.1" 200 13643
2014-04-28 03:35:42,724 - haystack.simple_backend - WARNING - update is not implemented in this backend
update is not implemented in this backend
[28/Apr/2014 03:35:42] WARNING [haystack.simple_backend:32] update is not implemented in this backend
[28/Apr/2014 03:35:42] ERROR [projects.models:295] failed to symlink project
Traceback (most recent call last):
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/models.py", line 293, in save
symlink(project=self.slug)
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 31, in symlink
v = version_from_slug(project, version)
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 26, in version_from_slug
v = Version.objects.get(project__slug=slug, slug=version)
File "/home/user/venvs/rtd/local/lib/python2.7/site-packages/django/db/models/manager.py", line 131, in get
return self.get_query_set().get(_args, *_kwargs)
File "/home/user/venvs/rtd/local/lib/python2.7/site-packages/django/db/models/query.py", line 366, in get
% self.model._meta.object_name)
DoesNotExist: Version matching query does not exist.—
Reply to this email directly or view it on GitHubhttps://github.com/rtfd/readthedocs.org/issues/805
.
Sorry, my checkout was old!
The symlink code there should be called after the super().save() method,
which should be saving the model. I'm not sure how it would be not
existing.
On Mon, Apr 28, 2014 at 8:06 AM, Eric Holscher [email protected]:
Guessing this is an old version of the code? I don't see the call to
symlink in the projects/models.py file at all.On Mon, Apr 28, 2014 at 1:51 AM, espdev [email protected] wrote:
I have installed RTD (from github master) as local private server. I have
used "Installation guide" (
http://read-the-docs.readthedocs.org/en/latest/install.html). I use
sqlite temporarily.I'm trying to make the build for pip and virtualenv. I'm getting an
error:[28/Apr/2014 03:35:09] "GET /projects/pip/ HTTP/1.1" 200 9197
[28/Apr/2014 03:35:16] "GET /dashboard/pip/edit/ HTTP/1.1" 200 13643
2014-04-28 03:35:42,724 - haystack.simple_backend - WARNING - update is not implemented in this backend
update is not implemented in this backend
[28/Apr/2014 03:35:42] WARNING [haystack.simple_backend:32] update is not implemented in this backend
[28/Apr/2014 03:35:42] ERROR [projects.models:295] failed to symlink project
Traceback (most recent call last):
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/models.py", line 293, in save
symlink(project=self.slug)
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 31, in symlink
v = version_from_slug(project, version)
File "/home/user/venvs/rtd/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 26, in version_from_slug
v = Version.objects.get(project__slug=slug, slug=version)
File "/home/user/venvs/rtd/local/lib/python2.7/site-packages/django/db/models/manager.py", line 131, in get
return self.get_query_set().get(_args, *_kwargs)
File "/home/user/venvs/rtd/local/lib/python2.7/site-packages/django/db/models/query.py", line 366, in get
% self.model._meta.object_name)
DoesNotExist: Version matching query does not exist.—
Reply to this email directly or view it on GitHubhttps://github.com/rtfd/readthedocs.org/issues/805
.
I did not run nginx, only test server ./manage.py runserver. This may be the reason? RTD has a full-functionality in the test environment?
I can not check this behavior with the vagrant virtual environment because I always get nginx error "502 Bad Gateway".
UPD:
On host system Ubuntu 14.04 vagrant virtual environment has been started and works correctly. Hmm... on host Windows 7 it does not work.
UPD2:
In vagrant virtual environment the error DoesNotExist: Version matching query does not exist. also exists in log file /home/docs/sites/readthedocs.org/checkouts/readthedocs.org/logs/rtd.log (I try to make build doc for "pip").
I have understood. For example, I have specified property "Repo" as https://github.com/pypa/pip. It is not correct, must be: https://github.com/pypa/pip.git. By default in the existing test projects property "Repo" was specified incorrectly.
@espdev Is the problem solved? I added the '.git' suffix to the repo url but I still get the error.
@unionx No, the problem has not been solved. '.git' suffix does not refer to the aforementioned problem. Apparently, something else has caused the problem.
@espdev Yes, I found other people report this problem too...I will check out the source code.
Any more information on this issue? There isn't enough here for me to really debug it much.
Closing this now, let me know if it's still an issue.
Also having this issue when importing a project in the local environment using a nginx + gunicorn set up.
This is not happening when running rtd with python manage.py runserver 0.0.0.0:8000
2014-08-20 03:24:11,558 - haystack.simple_backend - WARNING - update is not implemented in this backend
update is not implemented in this backend
[20/Aug/2014 03:24:11] WARNING [haystack.simple_backend:36] update is not implemented in this backend
[20/Aug/2014 03:24:11] ERROR [projects.models:297] failed to symlink project
Traceback (most recent call last):
File "/home/vagrant/rtd/checkouts/readthedocs.org/readthedocs/projects/models.py", line 295, in save
symlink(project=self.slug)
File "/home/vagrant/rtd/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 31, in symlink
v = version_from_slug(project, version)
File "/home/vagrant/rtd/checkouts/readthedocs.org/readthedocs/projects/utils.py", line 26, in version_from_slug
v = Version.objects.get(project__slug=slug, slug=version)
File "/home/vagrant/rtd/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
return self.get_queryset().get(*args, **kwargs)
File "/home/vagrant/rtd/lib/python2.7/site-packages/django/db/models/query.py", line 310, in get
self.model._meta.object_name)
DoesNotExist: Version matching query does not exist.
I also got the same problem on fresh install following instructions from the website. Is there any indications of what the issue is and/or how to work around this?
UPDATE: I tried doing manual build using the following "./manage.py update_repos pip" and that was throwing an error that it couldn't connect to anything. I was running the server on a custom IP and port using "./manage.py runserver
Same error here, after adding project http://github.com/yourlabs/django-autocomplete-light.git
This is occurring for me as well by following the installation instructions
I am running into this problem as well, not sure if a fix was ever found.
It is strange though -- I am logging through the code, and if i do p = Project.objects.get(slug=slug) i clearly get the project record, so the original save is working. Doing Version.objects.get(project=p, slug=version) fails, so it seems it is not the project that cannot be found, but the version itself. Perhaps indicative of an upstream problem with syncing/creation of versions?
Looking into my db, there is a latest version that gets created and properly linked to the project, but it perhaps is generated after that line?
I looked through the syncing logic -- one question I have is how do I provide authentication to the syncing? I tried a public repo from github, I'm wondering if wherever the checkout is trying to occur is failing on the server side (sudo permits?).
A bit more digging around:
user_builds, user_uploads directories -- not sure when they are being symlinked.Version records are definitely not being created before that call is happening -- printing out the number of Version objects on an empty structure is 0 at the point of call. It seems like the latest version gets generated after the fact, and always passes through the is a branch error check.Redis server, nor am i sure if that would be working or potentially a cause.Ok, I was able to get it to work on my setup -- I had improper configurations.
I'd followed instructions for setting up a nginx+uwsgi server to host this, which had it configured to use 8001 as the port.
I'm using postgresql, and configured nginx to use the server name and listen on port 80, proxying to the localhost.
I never changed the SLUMBER_API_HOST property in my local_settings.py however. That needed to change from http://localhost:8000 to 'http://PRODUCTION_DOMAIN setting.
Also, I was running on a small VM, so I only had a single process setup with my uwsgi app -- when it went to process the background tasks, the whole site locked up. Increasing that to 4 processes fixed the problem.
I'm not sure if the script would have auto-generated those user_builds folders or not since at this point I had manually created them, so if other people are still having issues, I would look into that as well.
So, in summary what worked for me is:
/readthedocs.org/readthedocs/settings/local_settings.pySLUMBER_API_HOST = 'http://<myserver>'PRODUCTION_DOMAIN = '<myserver>'processes to something greater than 1 in my /bin/uwsgi --processes 3 call (if using uwsgi)/readthedocs.org/user_builds, /readthedocs.org/user_uploads, /readthedocs.org/cnamesThanks for sharing @erichulser
I followed the default install doc (http://docs.readthedocs.org/en/latest/install.html) on my VM with Windows and I'm getting the same error when trying to do "manage.py update_repos pip"
C:\readthedocs>manage.py update_repos pip
[22/May/2015 17:32:30] INFO [core.management.commands.update_repos:63] Building
Pip
Traceback (most recent call last):
File "C:\readthedocs\manage.py", line 12, in
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management__init__.py", line
399, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management__init__.py", line
392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 242,
in run_from_argv
self.execute(_args, *_options.dict)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 285,
in execute
output = self.handle(_args, *_options)
File "C:\readthedocs\core\management\commands\update_repos.py", line 64, in ha
ndle
trigger_build(project=p, force=force)
File "C:\readthedocs\core\utils.py", line 85, in trigger_build
version = project.versions.get(slug='latest')
File "C:\Python27\lib\site-packages\django\db\models\manager.py", line 151, in
get
return self.get_queryset().get(_args, *_kwargs)
File "C:\Python27\lib\site-packages\django\db\models\query.py", line 310, in g
et
self.model._meta.object_name)
builds.models.DoesNotExist: Version matching query does not exist.
erichulser,
you can replace ‘pip’ with the name of any added project.
It is from the doc
Most helpful comment
Ok, I was able to get it to work on my setup -- I had improper configurations.
I'd followed instructions for setting up a nginx+uwsgi server to host this, which had it configured to use 8001 as the port.
I'm using postgresql, and configured nginx to use the server name and listen on port 80, proxying to the localhost.
I never changed the', as well as the
SLUMBER_API_HOSTproperty in my local_settings.py however. That needed to change fromhttp://localhost:8000to 'http://PRODUCTION_DOMAINsetting.Also, I was running on a small VM, so I only had a single process setup with my uwsgi app -- when it went to process the background tasks, the whole site locked up. Increasing that to 4 processes fixed the problem.
I'm not sure if the script would have auto-generated those
user_buildsfolders or not since at this point I had manually created them, so if other people are still having issues, I would look into that as well.So, in summary what worked for me is:
/readthedocs.org/readthedocs/settings/local_settings.pySLUMBER_API_HOST = 'http://<myserver>'PRODUCTION_DOMAIN = '<myserver>'processesto something greater than 1 in my/bin/uwsgi --processes 3call (if using uwsgi)/readthedocs.org/user_builds,/readthedocs.org/user_uploads,/readthedocs.org/cnames