Custom Query (1173 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (217 - 219 of 1173)

Ticket Resolution Summary Owner Reporter
#5397 fixed API client registration fails if Content-Type has options Ben Sturmfels
Description

I was just playing with the client registration API and noticed that the following valid request fails. The client I'm using is from the httpie package.

http --form --verbose POST http://127.0.0.1:6543/api/client/register type=client_associate application_type=native
POST /api/client/register HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Content-Length: 45
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Host: 127.0.0.1:6543
User-Agent: HTTPie/0.8.0

type=client_associate&application_type=native

HTTP/1.0 400 BAD REQUEST
Access-Control-Allow-Headers: Content-Type, X-Requested-With
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Origin: *
Content-Length: 33
Content-Type: application/json
Date: Tue, 19 Jan 2016 12:31:30 GMT
Server: PasteWSGIServer/0.5 Python/2.7.6
Set-Cookie: mediagoblin_csrftoken=12864927827420732302; HttpOnly; Path=
Vary: Cookie

{
    "error": "Unknown Content-Type"
}

It should succeed like this:

HTTP/1.0 200 OK
Access-Control-Allow-Headers: Content-Type, X-Requested-With
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Origin: *
Content-Length: 120
Content-Type: application/json
Date: Tue, 19 Jan 2016 12:32:00 GMT
Server: PasteWSGIServer/0.5 Python/2.7.6
Set-Cookie: mediagoblin_csrftoken=726380659778734454; HttpOnly; Path=
Vary: Cookie

{
    "client_id": "F5lY7pUrmL9ytOjF3RW1md", 
    "client_secret": "yAce42AR3a8SGUSiJDp4GbEaYB8xBQoktNU5ZjlpmWO", 
    "expires_at": 0
}

This looks to be caused by the content-type parsing function not being aware of extra options like Content-Type: application/x-www-form-urlencoded; charset=utf-8, since the simpler case works Content-Type: application/x-www-form-urlencoded.

Attaching a patch including tests for the current code paths plus one with header options.

#5409 fixed Media processing fails on video with year only Ben Sturmfels
Description

Re-processing a video that failed to be processed gives the following traceback:

$ bin/gmg reprocess --celery initial
DEBUG:mediagoblin.processing.task:Processing <MediaEntry 19: rock-your-emacs>

(python:3524): GStreamer-CRITICAL **: gst_date_time_get_month: assertion 'gst_date_time_has_month (datetime)' failed

(python:3524): GStreamer-CRITICAL **: gst_date_time_get_day: assertion 'gst_date_time_has_day (datetime)' failed

(python:3524): GStreamer-CRITICAL **: gst_date_time_get_hour: assertion 'gst_date_time_has_time (datetime)' failed

(python:3524): GStreamer-CRITICAL **: gst_date_time_get_minute: assertion 'gst_date_time_has_time (datetime)' failed

(python:3524): GStreamer-CRITICAL **: gst_date_time_get_second: assertion 'gst_date_time_has_second (datetime)' failed

(python:3524): GStreamer-CRITICAL **: gst_date_time_get_microsecond: assertion 'gst_date_time_has_second (datetime)' failed
ERROR:mediagoblin.processing.task:An unhandled exception was raised while processing <MediaEntry 19: rock-your-emacs>
WARNING:mediagoblin.processing:No idea what happened here, but it failed: ValueError('month must be in 1..12',)
WARNING:mediagoblin.processing:No idea what happened here, but it failed: ValueError('month must be in 1..12',)
Traceback (most recent call last):
  File "/home/web/local/mediagoblin/bin/gmg", line 9, in <module>
    load_entry_point('mediagoblin==0.8.0', 'console_scripts', 'gmg')()
  File "/home/web/local/mediagoblin/mediagoblin/gmg_commands/__init__.py", line 142, in main_cli
    args.func(args)
  File "/home/web/local/mediagoblin/mediagoblin/gmg_commands/reprocess.py", line 305, in reprocess
    initial(args)
  File "/home/web/local/mediagoblin/mediagoblin/gmg_commands/reprocess.py", line 280, in initial
    reprocess_action='initial')
  File "/home/web/local/mediagoblin/mediagoblin/submit/lib.py", line 257, in run_process_media
    task_id=entry.queued_task_id)
  File "/home/web/local/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.20-py2.7.egg/celery/app/task.py", line 557, in apply_async
    link=link, link_error=link_error, **options)
  File "/home/web/local/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.20-py2.7.egg/celery/app/task.py", line 755, in apply
    request=request, propagate=throw)
  File "/home/web/local/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.20-py2.7.egg/celery/app/trace.py", line 355, in eager_trace_task
    uuid, args, kwargs, request)
  File "/home/web/local/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.20-py2.7.egg/celery/app/trace.py", line 253, in trace_task
    I, R, state, retval = on_error(task_request, exc, uuid)
  File "/home/web/local/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.20-py2.7.egg/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/web/local/mediagoblin/mediagoblin/processing/task.py", line 101, in run
    processor.process(**reprocess_info)
  File "/home/web/local/mediagoblin/mediagoblin/media_types/video/processing.py", line 393, in process
    vp8_threads=vp8_threads, vorbis_quality=vorbis_quality)
  File "/home/web/local/mediagoblin/mediagoblin/media_types/video/processing.py", line 255, in transcode
    store_metadata(self.entry, metadata)
  File "/home/web/local/mediagoblin/mediagoblin/media_types/video/processing.py", line 136, in store_metadata
    'tags': get_tags(audio_info)
  File "/home/web/local/mediagoblin/mediagoblin/media_types/video/processing.py", line 112, in get_tags
    dt.get_microsecond()).isoformat()
ValueError: month must be in 1..12

I'll need to prepare a smaller video that has similar metadata, but the video I was uploading on is here:

http://www.sturm.com.au/2015/talks/rock-your-emacs-libreplanet/rock-your-emacs.webm

I'm assuming that the issue is that if there is any date information, MediaGoblin assumes the full date is supplied. This video only has a year specified I think, so the get_month() returns zero.

#5465 fixed Python 3: Home page error if more than a single page of media items Ben Sturmfels
Description

I upgraded a MediaGoblin instance with more than 30 media items to Python 3.4 and got the following error when attempting to load the home page:

  File "/home/ben/work/ws/mediagoblin/mediagoblin/tools/pagination.py", line 110, in get_page_url_explicit
    base_url, urllib.urlencode(new_get_params))
AttributeError: 'module' object has no attribute 'urlencode'

Loads fine under Python 2, or with 30 or less media items on Python 3 (only one page).

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.