Skip to content

ValueError: The 'file' attribute has no file associated with it. #196

Open

Description

@yomguy
Traceback (most recent call last):

  File "/opt/miniconda/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/srv/src/telemeta/telemeta/views/collection.py", line 134, in related_media_collection_stream
    response = serve_media(media.file.path, content_type=media.mime_type)

  File "/opt/miniconda/lib/python2.7/site-packages/django/db/models/fields/files.py", line 58, in _get_path
    self._require_file()

  File "/opt/miniconda/lib/python2.7/site-packages/django/db/models/fields/files.py", line 41, in _require_file
    raise ValueError("The '%s' attribute has no file associated with it." % self.field.name)

ValueError: The 'file' attribute has no file associated with it.

Activity

  1. self-assigned this
    on Oct 6, 2017
  2. yomguy commented on Oct 6, 2017

    @yomguy
    MemberAuthor

    path:/archives/collections/CNRSMH_I_2011_015/related/1374/view/

  3. thomasfillon commented on Oct 6, 2017

    @thomasfillon
    Member

    The related media is empty:

    for related in collection.related.all():
        print "ID: %s , Title: %s, file : %s" % (related.id, related.title, related.file)
    

    ID: 1373 , Title: Cahier d'enregistrements, file : items/2015/07/10/Carnet_Rec_1991_total.pdf
    ID: 1374 , Title: , file :

  4. thomasfillon commented on Oct 6, 2017

    @thomasfillon
    Member

    related media with ID 1374 from collection CNRSMH_I_2011_015 is empty except for the mime_type field = application/pdf

  5. added this to the 1.8 milestone on May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions