Opened 8 years ago

Closed 8 years ago

#6643 closed (duplicate)

Fixtures with absolute path names get loaded multiple times

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

Description (last modified by russellm)

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 Changed 8 years ago by russellm

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from Fixtures with absolute path names get logged multiple times to Fixtures 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 Changed 8 years ago by btoll <btoll@…>

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

comment:3 Changed 8 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

Agreed. Duplicate of #6436.

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