Opened 17 years ago

Closed 17 years ago

#6643 closed (duplicate)

Fixtures with absolute path names get loaded multiple times

Reported by: Russell Keith-Magee Owned by: nobody
Component: Core (Serialization) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Russell Keith-Magee)

Report from msoulier on django-users:

I'm loading a fixture with 2500 objects in it into postgres 7.4.

For some reason, loaddata is looking in a lot of additional places
than the file I'm handing it.

[root@vmware-espresso teleworker]# PYTHONPATH=.. python manage.py loaddata /root/clients.json
Loading '/root/clients.json' fixtures...
Installing json fixture '/root/clients' from '/usr/lib/python2.3/site-
packages/django/contrib/auth/fixtures'.
Installing json fixture '/root/clients' from '/usr/lib/python2.3/site-
packages/django/contrib/contenttypes/fixtures'.
Installing json fixture '/root/clients' from '/usr/lib/python2.3/site-
packages/django/contrib/sessions/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/dashboard/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/icps/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/clients/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/advanced/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/proxies/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/metrics/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/js/fixtures'.
Installing json fixture '/root/clients' from absolute path.
Installed 27500 object(s) from 11 fixture(s)

Change History (3)

comment:1 by Russell Keith-Magee, 17 years ago

Description: modified (diff)
Summary: Fixtures with absolute path names get logged multiple timesFixtures with absolute path names get loaded multiple times

I suspect the issue here stems from the way that os.path.join operates on absolute path names. As a result of this, the fixture specified as an absolute path is 'found' at every possible location.

comment:2 by btoll <btoll@…>, 17 years ago

I believe this report is a duplicate of ticket 6436 which has a patch.

comment:3 by Russell Keith-Magee, 17 years ago

Resolution: duplicate
Status: newclosed

Agreed. Duplicate of #6436.

Note: See TracTickets for help on using tickets.
Back to Top