Projet

Général

Profil

Bug #9020

Mis à jour par Frédéric Péters il y a plus de 8 ans

Arrivé au moment de valider la chose.

<pre>
Exception:
type = '<type 'exceptions.UnboundLocalError'>', value = 'local variable 'slug' referenced before assignment'

Stack trace (most recent call first):
File "/usr/lib/python2.7/dist-packages/wcs/admin/data_sources.py", line 65, in submit_form
63 if name == nds.name:
64 form.get_widget('name').set_error(_('This name is already used.'))
> 65 if slug == nds.slug:
66 form.get_widget('slug').set_error(_('This value is already used.'))
67 if form.has_errors():

locals:
nds = <NamedDataSource 'exceptions Castelnau' id:2>
name = 'Communes'
form = <qommon.form.Form object at 0x43911d0>
self = <wcs.admin.data_sources.NamedDataSourceUI object at 0x444ded0>

File "/usr/lib/python2.7/dist-packages/wcs/admin/data_sources.py", line 197, in new
195 datasource_ui.submit_form(form)
196 except ValueError:
> 197 pass
198 else:
199 return redirect('.')

locals:
self = <wcs.admin.data_sources.NamedDataSourcesDirectory object at 0x3356550>
datasource_ui = <wcs.admin.data_sources.NamedDataSourceUI object at 0x444ded0>
form = <qommon.form.Form object at 0x43911d0>

File "/usr/lib/pymodules/python2.7/quixote/directory.py", line 67, in _q_traverse
65 raise TraversalError
66 elif hasattr(obj, '__call__'):

... > 67 return obj()
68 else:
69 return obj

locals:
component = 'new'
self = <wcs.admin.data_sources.NamedDataSourcesDirectory object at 0x3356550>
obj = <bound method NamedDataSourcesDirectory.new of <wcs.admin.data_sources.NamedDataSourcesDirectory object at 0x3356550>>
name = 'new'
path = []

File "/usr/lib/python2.7/dist-packages/wcs/admin/data_sources.py", line 155, in _q_traverse
153 def _q_traverse(self, path):
154 get_response().breadcrumb.append( ('data-sources/', _('Data Sources')) )

> 155 return super(NamedDataSourcesDirectory, self)._q_traverse(path)
156
157 def _q_index(self):

locals:
path = ['new']
self = <wcs.admin.data_sources.NamedDataSourcesDirectory object at 0x3356550>

File "/usr/lib/pymodules/python2.7/quixote/directory.py", line 63, in _q_traverse
61 if path:
62 if hasattr(obj, '_q_traverse'):
> 63 return obj._q_traverse(path)
64 else:
65 raise TraversalError

locals:
component = 'data-sources'
self = <modules.admin.SettingsDirectory object at 0x4168490>
obj = <wcs.admin.data_sources.NamedDataSourcesDirectory object at 0x3356550>
name = 'data_sources'
path = ['new']

File "/usr/lib/pymodules/python2.7/quixote/directory.py", line 91, in _q_traverse
89 def _q_traverse(self, path):
90 self._q_access()
> 91 return super(AccessControlled, self)._q_traverse(path)
92
93

locals:
path = ['data-sources', 'new']
self = <modules.admin.SettingsDirectory object at 0x4168490>

File "/usr/lib/pymodules/python2.7/quixote/directory.py", line 63, in _q_traverse
61 if path:
62 if hasattr(obj, '_q_traverse'):
> 63 return obj._q_traverse(path)
64 else:
65 raise TraversalError

locals:
component = 'settings'
self = <modules.backoffice.BackofficeRootDirectory object at 0x4201490>
obj = <modules.admin.SettingsDirectory object at 0x4168490>
name = None
path = ['data-sources', 'new']

File "/usr/lib/pymodules/python2.7/quixote/directory.py", line 91, in _q_traverse
89 def _q_traverse(self, path):
90 self._q_access()
> 91 return super(AccessControlled, self)._q_traverse(path)
92
93

locals:
path = ['settings', 'data-sources', 'new']
self = <modules.backoffice.BackofficeRootDirectory object at 0x4201490>

File "/usr/lib/python2.7/dist-packages/wcs/backoffice/root.py", line 85, in _q_traverse
83 pass
84 get_response().add_javascript(['jquery.js', 'qommon.js', 'gadjo.sidepage.js'])
> 85 return super(RootDirectory, self)._q_traverse(path)
86
87 @classmethod

locals:
path = ['settings', 'data-sources', 'new']
self = <modules.backoffice.BackofficeRootDirectory object at 0x4201490>

File "/usr/lib/pymodules/python2.7/quixote/directory.py", line 63, in _q_traverse
61 if path:
62 if hasattr(obj, '_q_traverse'):
> 63 return obj._q_traverse(path)
64 else:
65 raise TraversalError

locals:
component = 'backoffice'
self = <modules.root.AlternateRootDirectory object at 0x4177150>
obj = <modules.backoffice.BackofficeRootDirectory object at 0x4201490>
name = 'backoffice'
path = ['settings', 'data-sources', 'new']

File "/usr/lib/pymodules/python2.7/extra-wcs-au-quotidien/modules/root.py", line 846, in _q_traverse
844 return redirect('%s%s/%s' % (base_url, f.category.url_name, uri_rest))
845
> 846 raise e
847
848

locals:
path = ['backoffice', 'settings', 'data-sources', 'new']
self = <modules.root.AlternateRootDirectory object at 0x4177150>
response = <qommon.http_response.HTTPResponse instance at 0x487e9e0>

File "/usr/lib/pymodules/python2.7/quixote/publish.py", line 253, in try_publish
251 permanent=True)
252 components = path[1:].split('/')
> 253 output = self.root_directory._q_traverse(components)
254 # The callable ran OK, commit any changes to the session
255 self.finish_successful_request()

locals:
path = '/backoffice/settings/data-sources/new'
self = <publisher.WcsPublisher instance at 0x4174ef0>
request = <qommon.http_request.HTTPRequest instance at 0x4188950>
components = ['backoffice', 'settings', 'data-sources', 'new']

File "/usr/lib/python2.7/dist-packages/wcs/qommon/publisher.py", line 619, in try_publish
617 for extra_source in self.extra_sources:
618 self.substitutions.feed(extra_source(self, request))
> 619 return Publisher.try_publish(self, request)
620
621 def get_site_language(self):

locals:
extra_source = <class 'modules.abelium_domino_vars.DominoVariables'>
pystatsd = <module 'qommon.vendor.pystatsd' from '/usr/lib/python2.7/dist-packages/wcs/qommon/vendor/pystatsd.pyc'>
request = <qommon.http_request.HTTPRequest instance at 0x4188950>
script_name = ''
prefix = 'm'
override_template_keys = {'m': 'mobile'}
canonical_hostname = 'eservices-montpellier.dev.entrouvert.org'
self = <publisher.WcsPublisher instance at 0x4174ef0>

File "/usr/lib/python2.7/dist-packages/wcs/publisher.py", line 215, in try_publish
213 if request.get_header('X_WCS_IFRAME_MODE', '') in ('true', 'yes'):
214 request.response.iframe_mode = True
> 215 return QommonPublisher.try_publish(self, request)
216
217 def initialize_sql(self):

locals:
self = <publisher.WcsPublisher instance at 0x4174ef0>
request = <qommon.http_request.HTTPRequest instance at 0x4188950>

File "/usr/lib/pymodules/python2.7/quixote/publish.py", line 281, in process_request
279 except:
280 # Some other exception, generate error messages to the logs, etc.
> 281 output = self.finish_failed_request()
282 output = self.filter_output(request, output)
283 self.logger.log_request(request, start_time)

locals:
start_time = 1447850936.526639
request = <qommon.http_request.HTTPRequest instance at 0x4188950>
self = <publisher.WcsPublisher instance at 0x4174ef0>

File "/usr/lib/python2.7/dist-packages/wcs/qommon/publisher.py", line 923, in process
921 def process(self, stdin, env):
922 request = HTTPRequest(stdin, env)
> 923 self.response = self.process_request(request)
924 return self.response
925

locals:
self = <publisher.WcsPublisher instance at 0x4174ef0>
stdin = <open file '<socket>', mode 'r' at 0x4205ed0>
request = <qommon.http_request.HTTPRequest instance at 0x4188950>
env = {'HTTP_REFERER': 'https://eservices-montpellier.dev.entrouvert.org/backoffice/settings/data-sources/new', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'POST', 'PATH_INFO': '/backoffice/settings/data-sources/new', 'SERVER_PROTOCOL': 'HTTP/1.1', 'QUERY_STRING': '', 'CONTENT_LENGTH': '852', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'publik_portal_agent_url=https%3A%2F%2Fbackoffice-agent-montpellier.dev.entrouvert.org%2F; publik_portal_agent_title=backoffice%20agent; wcs-5009d7="a9649dd967793a34"', 'SERVER_NAME': 'eservices-montpellier.dev.entrouvert.org', 'REMOTE_ADDR': '88.179.142.17', 'REMOTE_USER': '3382', 'SERVER_PORT': '443', 'DOCUMENT_ROOT': '/etc/nginx/html', 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------74726911512302182621662795296', 'DOCUMENT_URI': '/backoffice/settings/data-sources/new', 'HTTP_DNT': '1', 'HTTP_HOST': 'eservices-montpellier.dev.entrouvert.org', 'HTTPS': 'yes', 'HTTP_CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------74726911512302182621662795296', 'HTTP_CONTENT_LENGTH': '852', 'REQUEST_URI': '/backoffice/settings/data-sources/new', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'REMOTE_PORT': '49995', 'HTTP_ACCEPT_LANGUAGE': 'fr,en;q=0.5', 'SCGI': '1', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate'}

File "/usr/lib/pymodules/python2.7/quixote/server/scgi_server.py", line 27, in handle_connection
25 env['PATH_INFO'] = path[len(prefix):] + env.get('PATH_INFO', '')
26
> 27 response = self.publisher.process(input, env)
28 try:
29 response.write(output)

locals:
output = <open file '<socket>', mode 'w' at 0x4116780>
self = <qommon.scgi_server.QommonHandler instance at 0x41739e0>
conn = <socket object, fd=23, family=2, type=1, protocol=0>
env = {'HTTP_REFERER': 'https://eservices-montpellier.dev.entrouvert.org/backoffice/settings/data-sources/new', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'POST', 'PATH_INFO': '/backoffice/settings/data-sources/new', 'SERVER_PROTOCOL': 'HTTP/1.1', 'QUERY_STRING': '', 'CONTENT_LENGTH': '852', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'publik_portal_agent_url=https%3A%2F%2Fbackoffice-agent-montpellier.dev.entrouvert.org%2F; publik_portal_agent_title=backoffice%20agent; wcs-5009d7="a9649dd967793a34"', 'SERVER_NAME': 'eservices-montpellier.dev.entrouvert.org', 'REMOTE_ADDR': '88.179.142.17', 'REMOTE_USER': '3382', 'SERVER_PORT': '443', 'DOCUMENT_ROOT': '/etc/nginx/html', 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------74726911512302182621662795296', 'DOCUMENT_URI': '/backoffice/settings/data-sources/new', 'HTTP_DNT': '1', 'HTTP_HOST': 'eservices-montpellier.dev.entrouvert.org', 'HTTPS': 'yes', 'HTTP_CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------74726911512302182621662795296', 'HTTP_CONTENT_LENGTH': '852', 'REQUEST_URI': '/backoffice/settings/data-sources/new', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'REMOTE_PORT': '49995', 'HTTP_ACCEPT_LANGUAGE': 'fr,en;q=0.5', 'SCGI': '1', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate'}
input = <open file '<socket>', mode 'r' at 0x4205ed0>

File "/usr/lib/python2.7/dist-packages/wcs/qommon/scgi_server.py", line 35, in handle_connection
33 def handle_connection(self, conn):
34 self.number_of_connection_handled = self.number_of_connection_handled + 1
> 35 quixote.server.scgi_server.QuixoteHandler.handle_connection(self, conn)
36 # input, output and conn are closed, long running jobs could be done
37 # here.

locals:
self = <qommon.scgi_server.QommonHandler instance at 0x41739e0>
conn = <socket object, fd=23, family=2, type=1, protocol=0>

File "/usr/lib/pymodules/python2.7/scgi/scgi_server.py", line 71, in serve
69 conn.setblocking(1)
70 os.close(fd)
> 71 self.handle_connection(conn)
72
73

locals:
self = <qommon.scgi_server.QommonHandler instance at 0x41739e0>
fd = 22
conn = <socket object, fd=23, family=2, type=1, protocol=0>

File "/usr/lib/pymodules/python2.7/scgi/scgi_server.py", line 194, in spawn_child
192 # the connection in the child
193 os.close(child_fd)
> 194 self.handler_class(parent_fd).serve()
195 sys.exit(0)
196 else:

locals:
self = <qommon.scgi_server.SCGIServer instance at 0x4173950>
pid = 0
flags = 2
child_fd = 22
parent_fd = 21
conn = None

File "/usr/lib/pymodules/python2.7/scgi/scgi_server.py", line 172, in __init__
170 self.max_children = max_children
171 self.children = {} # { pid : fd }
> 172 self.spawn_child()
173 self.restart = 0
174

locals:
max_children = 5
host = 'localhost'
handler_class = <function create_handler at 0x4036488>
port = 3001
self = <qommon.scgi_server.SCGIServer instance at 0x4173950>

File "/usr/lib/python2.7/dist-packages/wcs/qommon/scgi_server.py", line 73, in run
71
72 s = SCGIServer(create_handler, host=host, port=port,
> 73 max_children=max_children)
74 s.serve()
75

locals:
create_handler = <function create_handler at 0x4036488>
handler_connection_limit = -1
max_children = 5
create_publisher = <bound method classobj.create_publisher of <class publisher.WcsPublisher at 0x3600a10>>
script_name = None
host = 'localhost'
spawn_cron = True
port = 3001

File "/usr/lib/python2.7/dist-packages/wcs/ctl/start.py", line 138, in execute
136
137 try:
> 138 run_function(publisher.WcsPublisher.create_publisher, **run_kwargs)
139 except socket.error, e:
140 self.del_pid()

locals:
publisher = <module 'publisher' from '/usr/lib/python2.7/dist-packages/wcs/publisher.pyc'>
base_app_dir = '/var/lib/wcs-au-quotidien'
args = []
tenant_path = '/var/lib/wcs-au-quotidien/cournonterral-site.montpellier.entrouvert.org'
self = <wcs.ctl.start.CmdStart object at 0x2eaab10>
hostname = 'cournonterral-site.montpellier.entrouvert.org'
pub = <publisher.WcsPublisher instance at 0x4163f80>
sub_options = <Values at 0x2f0d2d8: {'http': False, 'silent': False, 'app_dir': None, 'extra': ['/usr/lib/pymodules/python2.7/extra-wcs-au-quotidien/'], 'max_children': None, 'handler_connection_limit': None, 'script_name': None, 'daemonize': False, 'data_dir': None, 'port': 3001, 'pidfile': None}>
run_function = <function run at 0x2f0ae60>
base_options = <Values at 0x2e9e7e8: {'configfile': '/etc/wcs/wcs-au-quotidien.cfg'}>
run_kwargs = {'port': 3001, 'spawn_cron': True}

File "/usr/lib/python2.7/dist-packages/wcs/qommon/ctl.py", line 69, in run
67 for i, extra in enumerate(sub_options.extra):
68 self.config.set("extra", "cmd_line_extra_%d" % i, extra)
> 69 return self.execute(base_options, sub_options, args)
70
71 def parse_args(self, args):

locals:
extra = '/usr/lib/pymodules/python2.7/extra-wcs-au-quotidien/'
i = 0
self = <wcs.ctl.start.CmdStart object at 0x2eaab10>
args = []
sub_options = <Values at 0x2f0d2d8: {'http': False, 'silent': False, 'app_dir': None, 'extra': ['/usr/lib/pymodules/python2.7/extra-wcs-au-quotidien/'], 'max_children': None, 'handler_connection_limit': None, 'script_name': None, 'daemonize': False, 'data_dir': None, 'port': 3001, 'pidfile': None}>
base_options = <Values at 0x2e9e7e8: {'configfile': '/etc/wcs/wcs-au-quotidien.cfg'}>

File "/usr/lib/python2.7/dist-packages/wcs/qommon/ctl.py", line 159, in run
157 command_class = self.get_commands()[command]
158 cmd = command_class()
> 159 return cmd.run(args, options)
160

locals:
cmd = <wcs.ctl.start.CmdStart object at 0x2eaab10>
args = ['--extra', '/usr/lib/pymodules/python2.7/extra-wcs-au-quotidien/']
self = <wcs.qommon.ctl.Ctl object at 0x2e3e510>
command_class = <class 'wcs.ctl.start.CmdStart'>
command = 'start'
cmd_prefix = 'wcs.ctl'
options = <Values at 0x2e9e7e8: {'configfile': '/etc/wcs/wcs-au-quotidien.cfg'}>

File "/usr/sbin/wcsctl", line 8, in <module>
6
7 ctl = wcs.qommon.ctl.Ctl(cmd_prefixes=['wcs.ctl'])
> 8 ctl.run(sys.argv[1:])
9

locals:
wcs = <module 'wcs' from '/usr/lib/python2.7/dist-packages/wcs/__init__.pyc'>
__builtins__ = <module '__builtin__' (built-in)>
__file__ = '/usr/sbin/wcsctl'
__package__ = None
sys = <module 'sys' (built-in)>
ctl = <wcs.qommon.ctl.Ctl object at 0x2e3e510>
__name__ = '__main__'
__doc__ = None

Form:
_form_id '254a60de28f2c9d6'
data_source$type 'URL du JSON'
data_source$value '[passerelle_url]/csvdatasource/communes-encombrants/data'
description ''
name 'Communes'
submit 'Valider'

Cookies:
publik_portal_agent_title 'backoffice%20agent'
publik_portal_agent_url 'https%3A%2F%2Fbackoffice-agent-montpellier.dev.entrouvert.org%2F'
wcs-5009d7 'a9649dd967793a34'

Environment:
CONTENT_LENGTH '852'
CONTENT_TYPE 'multipart/form-data; boundary=---------------------------74726911512302182621662795296'
DOCUMENT_ROOT '/etc/nginx/html'
DOCUMENT_URI '/backoffice/settings/data-sources/new'
HTTPS 'yes'
HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_ENCODING 'gzip, deflate'
HTTP_ACCEPT_LANGUAGE 'fr,en;q=0.5'
HTTP_CONNECTION 'keep-alive'
HTTP_CONTENT_LENGTH '852'
HTTP_CONTENT_TYPE 'multipart/form-data; boundary=---------------------------74726911512302182621662795296'
HTTP_COOKIE 'publik_portal_agent_url=https%3A%2F%2Fbackoffice-agent-montpellier.dev.entrouvert.org%2F; publik_portal_agent_title=backoffice%20agent; wcs-5009d7="a9649dd967793a34"'
HTTP_DNT '1'
HTTP_HOST 'eservices-montpellier.dev.entrouvert.org'
HTTP_REFERER 'https://eservices-montpellier.dev.entrouvert.org/backoffice/settings/data-sources/new'
HTTP_USER_AGENT 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0'
PATH_INFO '/backoffice/settings/data-sources/new'
QUERY_STRING ''
REMOTE_ADDR '88.179.142.17'
REMOTE_PORT '49995'
REMOTE_USER '3382'
REQUEST_METHOD 'POST'
REQUEST_URI '/backoffice/settings/data-sources/new'
SCGI '1'
SCRIPT_NAME ''
SERVER_NAME 'eservices-montpellier.dev.entrouvert.org'
SERVER_PORT '443'
SERVER_PROTOCOL 'HTTP/1.1'
</pre>

Retour