[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#657405: installing on wheezy

On Mon, Aug 18, 2014 at 04:24:54PM +0200, Matija Nalis wrote:
>   File "/usr/share/mediagoblin/mediagoblin/init/plugins/__init__.py", line 56, in setup_plugins
>     __import__(plugin_module)
>   File "/usr/share/mediagoblin/mediagoblin/media_types/image/__init__.py", line 20, in <module>
>     from mediagoblin.media_types.image.processing import sniff_handler, \
>   File "/usr/share/mediagoblin/mediagoblin/media_types/image/processing.py", line 20, in <module>
>     import Image
> ImportError: No module named Image
> Removing PID file /tmp/mediagoblin.pid
> Hmmm, I'm stuck there. It seems maybe like that "could not import
> 'mediagoblin.media_types.image'" was not a harmless warning afterall,
> but we miss depending on something there?

that one depends seems to be missing is "python-imaging". Installing
that allows me to upload png file, but then breaks showing "Server
Error  YEOWCH... that's an error!   Something bad happened, and
things broke" and an nice ASCII goblin... 

Turns out CELERY_ALWAYS_EAGER should be 'true' if we're running this
way without separete celery process... So, command line to start
actually needs to be:

$ cd /tmp; PYTHONPATH=/usr/share/mediagoblin/ CELERY_ALWAYS_EAGER=true  /usr/bin/paster serve /etc/mediagoblin/paste.ini\ 
 --pid-file=/tmp/mediagoblin.pid --server-name=fcgi fcgi_host= fcgi_port=26543

so that one should go in README.Debian

Of course, when we ship init script, we can make it smarter than
that, to start separate processes with background processing etc. 
But for now, this way is needed to make it work.

After that, the picture actually uploads... however, no image
thumbnail or other info is shown, nor can I see the original image. 
I can see the files uploaded though, and thumbs created.

$ find /etc/mediagoblin/user_dev/ -type f -ls
806238510    4 -rw-------   1 mediagoblin mediagoblin       58 Aug 18 13:33 /etc/mediagoblin/user_dev/crypto/itsdangeroussecret.bin
133818280   24 -rw-r--r--   1 mediagoblin mediagoblin    22108 Aug 18 15:12 /etc/mediagoblin/user_dev/media/queue/media_entries/189fdc47-4268-44dc-977f-df64082d55bc/324px-Debian-logo-notext.svg.png
341789423   24 -rw-r--r--   1 mediagoblin mediagoblin    22108 Aug 18 15:28 /etc/mediagoblin/user_dev/media/queue/media_entries/cbfd28c1-51c8-428a-8037-0f387419d79a/324px-Debian-logo-notext.svg.png
806237997   16 -rw-r--r--   1 mediagoblin mediagoblin    15570 Aug 18 15:44 /etc/mediagoblin/user_dev/media/public/media_entries/3/324px-Debian-logo-notext.svg.thumbnail.png
806237998   24 -rw-r--r--   1 mediagoblin mediagoblin    22108 Aug 18 15:44 /etc/mediagoblin/user_dev/media/public/media_entries/3/324px-Debian-logo-notext.svg.png
806237999   36 -rw-r--r--   1 mediagoblin mediagoblin    34435 Aug 18 15:55 /etc/mediagoblin/user_dev/media/public/media_entries/4/computer_science_major.thumbnail.png
806238000  100 -rw-r--r--   1 mediagoblin mediagoblin   101293 Aug 18 15:55 /etc/mediagoblin/user_dev/media/public/media_entries/4/computer_science_major.png

I've changed  "location /mgoblin_media/" in nginx config from:
"alias /usr/share/mediagoblin/mediagoblin/user_dev/media/public/;" to:
"alias /etc/mediagoblin/user_dev/media/public/"

and now it actually works! Wooo-hooo :-)

Note that when you fix it not to go in "/etc", it actually should be
created probably in /var/lib/mediagoblin (precreated with right
owner/permissions), and definitely not in /usr (which is supposed to
be able to be mounted read-only in production)

Opinions above are GNU-copylefted.

Reply to: