Opened 7 years ago

Closed 7 years ago

#5497 closed defect (duplicate)

0.9.0 pdf fails: No plugins using two-step checking found

Reported by: Jorge Owned by:
Priority: major Milestone:
Component: programming Keywords:
Cc: Parent Tickets:


Looks like the pdf plugin can't handle PDF files.

  1. Setup production environment:
  2. Enable PDF support:

sudo apt-get install -y poppler-utils
echo "mediagoblin.media_types.pdf" >> mediagoblin_local.ini
git submodule init && git submodule update
./bin/gmg dbupdate
sudo service mediagoblin-paster restart

  1. try to upload attached sample PDF
2017-02-10 00:49:20,798 INFO    [mediagoblin.init.plugins] Importing plugin module: mediagoblin.media_types.pdf
2017-02-10 01:20:43,799 INFO    [mediagoblin.media_types] No plugins handled extension .pdf
2017-02-10 01:20:43,800 INFO    [mediagoblin.media_types] No plugins using two-step checking found

From mediagoblin/media_types/

def sniff_media(media_file, filename):
    Iterate through the enabled media types and find those suited
    for a certain file.
    # copy the contents to a .name-enabled temporary file for further checks
    # TODO: there are cases when copying is not required
    tmp_media_file = tempfile.NamedTemporaryFile()
    shutil.copyfileobj(media_file, tmp_media_file)
        return type_match_handler(tmp_media_file, filename)
    except TypeNotFound as e:'No plugins using two-step checking found')

Log messages look similar to #5348.

Change History (1)

comment:1 by ayleph, 7 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #5498.

Note: See TracTickets for help on using tickets.