Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#778 closed defect (fixed)

Error while clicking on "Edit" buttons

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

Description

I installed MG following deploying.html, and it worked well except for the "edit" buttons:

All these URL (where $USER = "testeur") returns the error below:
/u/$USER/m/1/edit/
/u/$USER/edit/
/edit/account/

Error - <type 'exceptions.ImportError'>: No module named forms
URL: http://192.168.1.123/u/testeur/m/1/edit/
sys.path: [
    '/srv/mediagoblin.lan/mediagoblin/bin',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/oauthlib-0.5.0-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/six-1.4.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/pytz-2013d-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/itsdangerous-0.23-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/mock-1.0.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/sqlalchemy_migrate-0.7.2-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/SQLAlchemy-0.8.2-py2.7-linux-i686.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Markdown-2.3.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/configobj-4.7.2-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/WebTest-1.4.3-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Babel-0.9.6-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Sphinx-1.2b2-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/kombu-2.5.14-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/celery-3.0.23-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Werkzeug-0.9.4-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/pytest_xdist-1.8-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/pytest-2.3.5-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/py_bcrypt-0.4-py2.7-linux-i686.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/WTForms-1.0.5-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Tempita-0.5.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/decorator-3.4.0-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/WebOb-1.2.3-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/docutils-0.11-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Pygments-1.6-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/MarkupSafe-0.18-py2.7-linux-i686.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/amqp-1.0.13-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/anyjson-0.3.3-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/python_dateutil-2.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/billiard-2.7.3.32-py2.7-linux-i686.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/execnet-1.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/py-1.4.15-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/argparse-1.2.1-py2.7.egg',
    '/srv/mediagoblin.lan/mediagoblin/lib/python2.7',
    '/srv/mediagoblin.lan/mediagoblin/lib/python2.7/plat-linux2',
    '/srv/mediagoblin.lan/mediagoblin/lib/python2.7/lib-tk',
    '/srv/mediagoblin.lan/mediagoblin/lib/python2.7/lib-old',
    '/srv/mediagoblin.lan/mediagoblin/lib/python2.7/lib-dynload',
    '/usr/lib/python2.7',
    '/usr/lib/python2.7/plat-linux2',
    '/usr/lib/python2.7/lib-tk',
    '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages',
    '/srv/mediagoblin.lan/mediagoblin/lib/python2.7/site-packages',
    '/usr/local/lib/python2.7/site-packages',
    '/usr/local/lib/python2.7/dist-packages',
    '/usr/lib/python2.7/dist-packages',
    '/usr/lib/python2.7/dist-packages/PIL',
    '/usr/lib/pymodules/python2.7']
File '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/exceptions/errormiddleware.py', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/urlmap.py', line 203 in __call__
  return app(environ, start_response)
File '/srv/mediagoblin.lan/mediagoblin/mediagoblin/app.py', line 259 in __call__
  return self.call_backend(environ, start_response)
File '/srv/mediagoblin.lan/mediagoblin/mediagoblin/app.py', line 216 in call_backend
  controller = endpoint_to_controller(found_rule)
File '/srv/mediagoblin.lan/mediagoblin/mediagoblin/tools/routing.py', line 48 in endpoint_to_controller
  view_func = import_component(view_func)
File '/srv/mediagoblin.lan/mediagoblin/mediagoblin/tools/common.py', line 34 in import_component
  __import__(module_name)
File '/srv/mediagoblin.lan/mediagoblin/mediagoblin/edit/views.py', line 28 in <module>
  from mediagoblin.edit import forms
File '/srv/mediagoblin.lan/mediagoblin/mediagoblin/edit/forms.py', line 22 in <module>
  from mediagoblin.auth.forms import normalize_user_or_email_field
ImportError: No module named forms


CGI Variables
-------------
  DOCUMENT_ROOT: '/etc/nginx/html'
  DOCUMENT_URI: '/u/testeur/m/1/edit/'
  GATEWAY_INTERFACE: 'CGI/1.1'
  HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
  HTTP_ACCEPT_ENCODING: 'gzip, deflate'
  HTTP_ACCEPT_LANGUAGE: 'en-us,fr-fr;q=0.8,fr;q=0.5,en;q=0.3'
  HTTP_CONNECTION: 'keep-alive'
  HTTP_COOKIE: 'mediagoblin_csrftoken=8409822828611344304; user="!Zt+i5ZvGP09hZRKavgz45g==?gAJVBHVzZXJxAVUFYWRtaW5xAoZxAy4="; mediagoblin_csrftoken=8409822828611344304; MGSession=eyJtZXNzYWdlcyI6W10sInVzZXJfaWQiOiIxIn0.BSY41A.-ZbodZjZ4zaIjDKnv_AUQal2PY4'
  HTTP_DNT: '1'
  HTTP_HOST: '192.168.1.123'
  HTTP_REFERER: 'http://192.168.1.123/u/testeur/m/tarn-libre-1952-03-00-bressolle-rose/'
  HTTP_USER_AGENT: 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0 Iceweasel/23.0'
  PATH_INFO: '/u/testeur/m/1/edit/'
  REDIRECT_STATUS: '200'
  REMOTE_ADDR: '192.168.1.100'
  REMOTE_PORT: '50385'
  REQUEST_METHOD: 'GET'
  REQUEST_URI: '/u/testeur/m/1/edit/'
  SCRIPT_FILENAME: '/etc/nginx/html/u/testeur/m/1/edit/'
  SERVER_ADDR: '192.168.1.123'
  SERVER_NAME: 'mediagoblin.lan'
  SERVER_PORT: '80'
  SERVER_PROTOCOL: 'HTTP/1.1'
  SERVER_SOFTWARE: 'nginx/1.2.1'


WSGI Variables
--------------
  application: {(None, '/mgoblin_static'): <StaticURLParser '/srv/mediagoblin.lan/mediagoblin/mediagoblin/static'>, (None, '/mgoblin_media'): <StaticURLParser '/srv/mediagoblin.lan/mediagoblin/user_dev/media/public'>, (None, ''): <mediagoblin.app.MediaGoblinApp object at 0xae8090c>, (None, '/plugin_static'): <StaticURLParser '/srv/mediagoblin.lan/mediagoblin/user_dev/plugin_static'>, (None, '/theme_static'): <StaticURLParser '/srv/mediagoblin.lan/mediagoblin/user_dev/theme_static'>}
  paste.throw_errors: True
  werkzeug.request: <Request 'http://192.168.1.123/u/testeur/m/1/edit/' [GET]>
  wsgi process: 'Multiprocess'
------------------------------------------------------------
Traceback (most recent call last):
  File "./bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in run
    result = self.command()
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 311, in command
    serve()
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 295, in serve
    server(app)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 189, in server_wrapper
    **context.local_conf)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/paste_factory.py", line 154, in run_fcgi_fork
    s.run()
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_fork.py", line 140, in run
    ret = PreforkServer.run(self, sock)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 135, in run
    if not self._spawnChild(sock): break
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 328, in _spawnChild
    self._child(sock, parent)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 406, in _child
    self._jobClass(clientSock, addr, *self._jobArgs).run()
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 669, in run
    self.process_input()
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 705, in process_input
    self._do_params(rec)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 805, in _do_params
    self._start_request(req)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 789, in _start_request
    req.run()
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 593, in run
    self._end(appStatus, protocolStatus)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 599, in _end
    self._conn.end_request(self, appStatus, protocolStatus)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 736, in end_request
    self.writeRecord(rec)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 720, in writeRecord
    rec.write(self._sock)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 530, in write
    self._sendall(sock, header)
  File "/srv/mediagoblin.lan/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 507, in _sendall
    sent = sock.send(data)
socket.error: [Errno 104] Connection reset by peer

Change History (6)

comment:1 by Matt Molyneaux, 11 years ago

This seems to have been fixed by commit 515e3bd. What version of MediaGoblin were you using?

comment:2 by Bro666, 11 years ago

Solved it. Change line 22 in /your/mediagoblin/path/edit/forms.py to

 from mediagoblin.auth.tools import normalize_user_or_email_field

(It currently says

 from mediagoblin.auth.forms import normalize_user_or_email_field

which is wrong).

Last edited 11 years ago by Bro666 (previous) (diff)

comment:3 by Bro666, 11 years ago

Ooops. Too late moggers87 is right.

comment:4 by Matt Molyneaux, 11 years ago

Resolution: fixed
Status: newclosed

comment:5 by Matt Molyneaux, 11 years ago

Marking as fixed, even though this still affects 0.5.1

comment:6 by ShawnRisk, 9 years ago

I asked on a few people on IRC, and they said this is completely fixed.

Note: See TracTickets for help on using tickets.