{"action":"opened","issue":{"url":"https://api.github.com/repos/devpi/devpi/issues/522","repository_url":"https://api.github.com/repos/devpi/devpi","labels_url":"https://api.github.com/repos/devpi/devpi/issues/522/labels{/name}","comments_url":"https://api.github.com/repos/devpi/devpi/issues/522/comments","events_url":"https://api.github.com/repos/devpi/devpi/issues/522/events","html_url":"https://github.com/devpi/devpi/issues/522","id":306458811,"number":522,"title":"Intermittent AssertionError: no transaction entry at 10318 when trying to install packages","user":{"login":"wridgers","id":235730,"avatar_url":"https://avatars3.githubusercontent.com/u/235730?v=4","gravatar_id":"","url":"https://api.github.com/users/wridgers","html_url":"https://github.com/wridgers","followers_url":"https://api.github.com/users/wridgers/followers","following_url":"https://api.github.com/users/wridgers/following{/other_user}","gists_url":"https://api.github.com/users/wridgers/gists{/gist_id}","starred_url":"https://api.github.com/users/wridgers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wridgers/subscriptions","organizations_url":"https://api.github.com/users/wridgers/orgs","repos_url":"https://api.github.com/users/wridgers/repos","events_url":"https://api.github.com/users/wridgers/events{/privacy}","received_events_url":"https://api.github.com/users/wridgers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-19T13:19:15Z","updated_at":"2018-03-19T13:19:15Z","closed_at":null,"author_association":"NONE","body":"I'm getting intermittent errors from devpi when trying to install packages.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/waitress/channel.py\", line 338, in service\r\n    task.service()\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/waitress/task.py\", line 169, in service\r\n    self.execute()\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/waitress/task.py\", line 399, in execute\r\n    app_iter = self.channel.server.application(env, start_response)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/views.py\", line 143, in __call__\r\n    return self.app(environ, start_response)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/router.py\", line 270, in __call__\r\n    response = self.execution_policy(environ, self)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/router.py\", line 278, in default_execution_policy\r\n    return request.invoke_exception_view(reraise=True)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/view.py\", line 755, in invoke_exception_view\r\n    reraise_(*exc_info)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/router.py\", line 276, in default_execution_policy\r\n    return router.invoke_request(request)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/router.py\", line 249, in invoke_request\r\n    response = handle_request(request)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/views.py\", line 166, in request_log_handler\r\n    response = handler(request)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/views.py\", line 201, in request_tx_handler\r\n    response = handler(request)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/tweens.py\", line 41, in excview_tween\r\n    response = _error_handler(request, exc)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/tweens.py\", line 16, in _error_handler\r\n    reraise(*exc_info)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/tweens.py\", line 39, in excview_tween\r\n    response = handler(request)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/router.py\", line 156, in handle_request\r\n    view_name\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/view.py\", line 642, in _call_view\r\n    response = view_callable(context, request)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/viewderivers.py\", line 410, in viewresult_to_response\r\n    result = view(context, request)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/pyramid/viewderivers.py\", line 124, in _class_requestonly_view\r\n    response = getattr(inst, attr)()\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/views.py\", line 406, in simple_list_project\r\n    result = stage.get_simplelinks(project, sorted_links=not requested_by_pip)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/model.py\", line 481, in get_simplelinks\r\n    \"get_simplelinks_perstage\", project=project):\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/model.py\", line 542, in op_sro_check_mirror_whitelist\r\n    res = getattr(stage, opname)(**kw)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/extpypi.py\", line 288, in get_simplelinks_perstage\r\n    is_fresh, links, cache_serial = self._load_cache_links(project)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/extpypi.py\", line 258, in _load_cache_links\r\n    cache = self.key_projsimplelinks(project).get()\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/keyfs.py\", line 339, in get\r\n    return self.keyfs.tx.get(self, readonly=readonly)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/keyfs.py\", line 425, in get\r\n    val = self.get_value_at(typedkey, self.at_serial)\r\n  File \"/opt/devpi/venv/local/lib/python2.7/site-packages/devpi_server/keyfs.py\", line 383, in get_value_at\r\n    assert tup, \"no transaction entry at %s\" %(last_serial)\r\nAssertionError: no transaction entry at 10318\r\n```\r\n\r\nhttps://github.com/devpi/devpi/blob/master/server/devpi_server/keyfs.py#L383\r\n\r\nIn this case I was trying to install the `websocket-client` package. The 'fix' was:\r\n\r\n```\r\ndevpi=# begin;\r\nBEGIN\r\ndevpi=# delete from kv where key like '%websocket%';\r\nDELETE 215\r\ndevpi=# delete from files where path like '%websocket%';\r\nDELETE 11\r\ndevpi=# commit;\r\nCOMMIT\r\n```"}}
{"actor":{"display_login":"wridgers"}}