是什么会导致/ group路由上的无限重定向?

时间:2018-07-09 03:13:06

标签: python flask pylons ckan

我在Mac上本地运行CKAN 2.6.3。我尝试从远程实例上的数据库转储中复制此实例。该网站的其余部分似乎工作正常,但是按/ group会导致无限重定向。

如果我尝试访问特定的小组,我可以认为很好。 添加一个组会为我提供以下堆栈跟踪。

IntegrityError: (IntegrityError) duplicate key value violates unique constraint "group_name_key" DETAIL: Key (name)=() already exists. 'INSERT INTO "group" (id, name, title, type, description, image_url, created, is_organization, approval_status, state, revision_id) VALUES (%(id)s, %(name)s, %(title)s, %(type)s, %(description)s, %(image_url)s, %(created)s, %(is_organization)s, %(approval_status)s, %(state)s, %(revision_id)s)' {'description': u'', 'created': datetime.datetime(2018, 7, 8, 19, 57, 57, 297647), 'title': u'', 'approval_status': u'approved', 'is_organization': False, 'state': u'active', 'image_url': u'', 'revision_id': u'339d9b92-cfc3-4a0b-9bb7-cd8e53f15f62', 'type': u'group', 'id': 'a827e08b-9afd-4e3a-98c3-a78e4247b377', 'name': u''}

遵循了一些故障排除路径后,除了发现对/ group的初始请求提供了向/ group的301重定向之外,我已经干了。

其他花絮:

  • 远程实例在Windows下运行时没有相同的问题 粘贴httpserver
  • 在本地使用标准粘贴程序httpserver 与paster serve /etc/ckan/development.ini
  • 我也无法添加 数据集。正如我在发布此消息时发现的那样。在我看来 一个相关的错误。 (stacktrace在下面发布)

IntegrityError: (IntegrityError) null value in column "name" violates not-null constraint DETAIL: Failing row contains (b7b54c05-cbb7-4f15-ac05-2d8caf442eb4, null, null, null, null, null, null, 0c61de41-bd40-4f7a-b639-16a2f2aea503, null, null, null, null, active, dataset, null, f, 2018-07-09 03:08:37.42187, null, 2018-07-09 03:08:37.421862). 'INSERT INTO package (id, name, title, version, url, author, author_email, maintainer, maintainer_email, notes, license_id, type, owner_org, creator_user_id, metadata_created, metadata_modified, private, state, revision_id) VALUES (%(id)s, %(name)s, %(title)s, %(version)s, %(url)s, %(author)s, %(author_email)s, %(maintainer)s, %(maintainer_email)s, %(notes)s, %(license_id)s, %(type)s, %(owner_org)s, %(creator_user_id)s, %(metadata_created)s, %(metadata_modified)s, %(private)s, %(state)s, %(revision_id)s)' {'maintainer': None, 'name': None, 'metadata_modified': datetime.datetime(2018, 7, 9, 3, 8, 37, 421870), 'title': None, 'url': None, 'notes': None, 'owner_org': None, 'private': False, 'maintainer_email': None, 'author_email': None, 'state': u'active', 'version': None, 'author': None, 'creator_user_id': None, 'license_id': None, 'revision_id': u'0c61de41-bd40-4f7a-b639-16a2f2aea503', 'type': u'dataset', 'id': 'b7b54c05-cbb7-4f15-ac05-2d8caf442eb4', 'metadata_created': datetime.datetime(2018, 7, 9, 3, 8, 37, 421862)}

我的直觉是,有一些损坏的数据,无论是数据集还是组,其名称值均为空,然后名称没有正确传递。

Here's the config, with certain details omitted partially or entirely.

0 个答案:

没有答案
相关问题