Project

General

Profile

Bug #4238

type object 'RootDirectory' has no attribute 'forms'

Added by Jérôme Schneider over 8 years ago. Updated over 8 years ago.

Status:
Fermé
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
21 January 2014
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Planning:

Description

Les versions :

  • wcs-au-quotidien : 1.9.45.ge008d4d-1+eob6~eo70+2
  • wcs : 1.9.221.g43133f0-1+eob6~eo70+2

Lorsque je me rends sur https://eservices.au-quotidien.com/backoffice/ sachant que je n'ai pas encore défini de formulaire j'ai ce traceback :

Exception:
  type = '<type 'exceptions.AttributeError'>', value = 'type object 'RootDirectory' has no attribute 'forms''

Stack trace (most recent call first):
  File "/usr/share/pyshared/extra-wcs-au-quotidien/modules/backoffice.py", line 33, in home
    31         r += _('Welcome on Au Quotidien back office interface')
    32         r += htmltext('</p>')
>   33         r += wcs.backoffice.root.RootDirectory.forms(self)
    34         from qommon.backoffice.menu import html_top
    35         html_top('home', _('Pending Forms'))

  locals: 
     self = <modules.backoffice.BackofficeRootDirectory object at 0x31e1f50>
     r = <TemplateIO object at 0x339e930>

  File "/usr/share/pyshared/extra-wcs-au-quotidien/modules/backoffice.py", line 26, in _q_index
    24 
    25     def _q_index(self):
>   26         return self.home()
    27 
    28     def home(self):

  locals: 
     self = <modules.backoffice.BackofficeRootDirectory object at 0x31e1f50>

  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 = ''
     self = <modules.backoffice.BackofficeRootDirectory object at 0x31e1f50>
     obj = <bound method BackofficeRootDirectory._q_index of <modules.backoffice.BackofficeRootDirectory object at 0x31e1f50>>
     name = '_q_index'
     path = []

  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 = ['']
     self = <modules.backoffice.BackofficeRootDirectory object at 0x31e1f50>

  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 0x31d62d0>
     obj = <modules.backoffice.BackofficeRootDirectory object at 0x31e1f50>
     name = 'backoffice'
     path = ['']

  File "/usr/share/pyshared/extra-wcs-au-quotidien/modules/root.ptl", line 806, in _q_traverse
   804                     return redirect('%s%s/%s' % (base_url, f.category.url_name, uri_rest))
   805 
>  806             raise e
   807 
   808 

  locals: 
     path = ['backoffice', '']
     self = <modules.root.AlternateRootDirectory object at 0x31d62d0>
     session = <BasicSession at 31e1e50: e4258c104604dce9>
     response = <qommon.http_response.HTTPResponse instance at 0x3382878>

  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/'
     self = <publisher.WcsPublisher instance at 0x3253fc8>
     request = <qommon.http_request.HTTPRequest instance at 0x3382638>
     components = ['backoffice', '']

  File "/usr/lib/python2.7/dist-packages/wcs/qommon/publisher.py", line 537, in try_publish
   535         for extra_source in self.extra_sources:
   536             self.substitutions.feed(extra_source(self, request))
>  537         return Publisher.try_publish(self, request)
   538 
   539     def get_site_language(self):

  locals: 
     pystatsd = <module 'qommon.vendor.pystatsd' from '/usr/lib/python2.7/dist-packages/wcs/qommon/vendor/pystatsd.py'>
     request = <qommon.http_request.HTTPRequest instance at 0x3382638>
     script_name = ''
     extra_source = <class 'modules.abelium_domino_vars.DominoVariables'>
     canonical_hostname = 'eservices.au-quotidien.com'
     self = <publisher.WcsPublisher instance at 0x3253fc8>

  File "/usr/lib/python2.7/dist-packages/wcs/publisher.py", line 141, in try_publish
   139         if request.get_header('X_WCS_IFRAME_MODE', '') in ('true', 'yes'):
   140             request.response.iframe_mode = True
>  141         return QommonPublisher.try_publish(self, request)
   142 
   143 set_publisher_class(WcsPublisher)

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

  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 = 1390296751.409307
     request = <qommon.http_request.HTTPRequest instance at 0x3382638>
     self = <publisher.WcsPublisher instance at 0x3253fc8>

  File "/usr/lib/python2.7/dist-packages/wcs/qommon/publisher.py", line 843, in process
   841     def process(self, stdin, env):
   842         request = HTTPRequest(stdin, env)
>  843         self.response = self.process_request(request)
   844         return self.response
   845 

  locals: 
     self = <publisher.WcsPublisher instance at 0x3253fc8>
     stdin = <open file '<socket>', mode 'r' at 0x3156390>
     request = <qommon.http_request.HTTPRequest instance at 0x3382638>
     env = {'HTTP_COOKIE': 'wcs-b4220e="e4258c104604dce9"', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'GET', 'PATH_INFO': '/backoffice/', 'HTTP_X_FORWARDED_SSL': 'on', 'QUERY_STRING': '', 'CONTENT_LENGTH': '0', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36', 'HTTP_CONNECTION': 'close', 'SERVER_NAME': 'eservices.au-quotidien.com', 'REMOTE_ADDR': '192.168.1.1', 'HTTP_X_FORWARDED_PROTOCOL': 'ssl', 'SERVER_PORT': '80', 'DOCUMENT_ROOT': '/etc/nginx/html', 'HTTP_PRAGMA': 'no-cache', 'CONTENT_TYPE': '', 'HTTP_X_FORWARDED_PROTO': 'https', 'DOCUMENT_URI': '/backoffice/', 'REMOTE_USER': '2', 'HTTP_HOST': 'eservices.au-quotidien.com', 'HTTPS': 'yes', 'HTTP_CACHE_CONTROL': 'no-cache', 'REQUEST_URI': '/backoffice/', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'REMOTE_PORT': '36352', 'HTTP_ACCEPT_LANGUAGE': 'fr-FR,en-US;q=0.8,en;q=0.6,fr;q=0.4', 'SCGI': '1', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch'}

  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 0x31f8150>
     self = <qommon.scgi_server.QommonHandler instance at 0x2871440>
     conn = <socket object, fd=5, family=2, type=1, protocol=0>
     env = {'HTTP_COOKIE': 'wcs-b4220e="e4258c104604dce9"', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'GET', 'PATH_INFO': '/backoffice/', 'HTTP_X_FORWARDED_SSL': 'on', 'QUERY_STRING': '', 'CONTENT_LENGTH': '0', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36', 'HTTP_CONNECTION': 'close', 'SERVER_NAME': 'eservices.au-quotidien.com', 'REMOTE_ADDR': '192.168.1.1', 'HTTP_X_FORWARDED_PROTOCOL': 'ssl', 'SERVER_PORT': '80', 'DOCUMENT_ROOT': '/etc/nginx/html', 'HTTP_PRAGMA': 'no-cache', 'CONTENT_TYPE': '', 'HTTP_X_FORWARDED_PROTO': 'https', 'DOCUMENT_URI': '/backoffice/', 'REMOTE_USER': '2', 'HTTP_HOST': 'eservices.au-quotidien.com', 'HTTPS': 'yes', 'HTTP_CACHE_CONTROL': 'no-cache', 'REQUEST_URI': '/backoffice/', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'REMOTE_PORT': '36352', 'HTTP_ACCEPT_LANGUAGE': 'fr-FR,en-US;q=0.8,en;q=0.6,fr;q=0.4', 'SCGI': '1', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch'}
     input = <open file '<socket>', mode 'r' at 0x3156390>

  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 0x2871440>
     conn = <socket object, fd=5, 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 0x2871440>
     fd = 4
     conn = <socket object, fd=5, 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 0x28710e0>
     pid = 0
     flags = 2
     child_fd = 4
     parent_fd = 3
     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 0x2fb4488>
     port = 3001
     self = <qommon.scgi_server.SCGIServer instance at 0x28710e0>

  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 0x2fb4488>
     handler_connection_limit = -1
     max_children = 5
     create_publisher = <bound method classobj.create_publisher of <class publisher.WcsPublisher at 0x2f9b870>>
     script_name = None
     host = 'localhost'
     spawn_cron = True
     port = 3001

  File "/usr/lib/python2.7/dist-packages/wcs/ctl/start.py", line 120, in execute
   118 
   119         try:
>  120             run_function(publisher.WcsPublisher.create_publisher, **run_kwargs)
   121         except socket.error, e:
   122             self.del_pid()

  locals: 
     publisher = <module 'publisher' from '/usr/lib/python2.7/dist-packages/wcs/publisher.py'>
     self = <wcs.ctl.start.CmdStart instance at 0x284f200>
     args = []
     sub_options = <Values at 0x2868f80: {'http': False, 'silent': False, 'app_dir': None, 'extra': ['/usr/share/pyshared/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 0x286f758>
     base_options = <Values at 0x284bd40: {'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 64, in run
    62         if sub_options.data_dir:
    63             self.config.set("main", "data_dir", sub_options.data_dir)
>   64         return self.execute(base_options, sub_options, args)
    65 
    66     def parse_args(self, args):

  locals: 
     sub_options = <Values at 0x2868f80: {'http': False, 'silent': False, 'app_dir': None, 'extra': ['/usr/share/pyshared/extra-wcs-au-quotidien/'], 'max_children': None, 'handler_connection_limit': None, 'script_name': None, 'daemonize': False, 'data_dir': None, 'port': 3001, 'pidfile': None}>
     args = []
     base_options = <Values at 0x284bd40: {'configfile': '/etc/wcs/wcs-au-quotidien.cfg'}>
     self = <wcs.ctl.start.CmdStart instance at 0x284f200>

  File "/usr/lib/python2.7/dist-packages/wcs/qommon/ctl.py", line 150, in run
   148         command_class = qommon._commands[command]
   149         cmd = command_class()
>  150         return cmd.run(args, options)
   151 

  locals: 
     cmd = <wcs.ctl.start.CmdStart instance at 0x284f200>
     args = ['--extra', '/usr/share/pyshared/extra-wcs-au-quotidien/']
     self = <wcs.qommon.ctl.Ctl instance at 0x24fee60>
     command_class = <class wcs.ctl.start.CmdStart at 0x286aa10>
     command = 'start'
     cmd_prefix = 'wcs.ctl'
     options = <Values at 0x284bd40: {'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 instance at 0x24fee60>
     __name__ = '__main__'
     __doc__ = None

Form:

Cookies:
wcs-b4220e      'e4258c104604dce9'

Environment:
CONTENT_LENGTH  '0'
CONTENT_TYPE    ''
DOCUMENT_ROOT   '/etc/nginx/html'
DOCUMENT_URI    '/backoffice/'
HTTPS           'yes'
HTTP_ACCEPT     'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
HTTP_ACCEPT_ENCODING 'gzip,deflate,sdch'
HTTP_ACCEPT_LANGUAGE 'fr-FR,en-US;q=0.8,en;q=0.6,fr;q=0.4'
HTTP_CACHE_CONTROL 'no-cache'
HTTP_CONNECTION 'close'
HTTP_COOKIE     'wcs-b4220e="e4258c104604dce9"'
HTTP_HOST       'eservices.au-quotidien.com'
HTTP_PRAGMA     'no-cache'
HTTP_USER_AGENT 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36'
HTTP_X_FORWARDED_PROTO 'https'
HTTP_X_FORWARDED_PROTOCOL 'ssl'
HTTP_X_FORWARDED_SSL 'on'
PATH_INFO       '/backoffice/'
QUERY_STRING    ''
REMOTE_ADDR     '192.168.1.1'
REMOTE_PORT     '36352'
REMOTE_USER     '2'
REQUEST_METHOD  'GET'
REQUEST_URI     '/backoffice/'
SCGI            '1'
SCRIPT_NAME     ''
SERVER_NAME     'eservices.au-quotidien.com'
SERVER_PORT     '80'
SERVER_PROTOCOL 'HTTP/1.0'

History

#1

Updated by Frédéric Péters (de retour le 10/10) over 8 years ago

  • Status changed from Nouveau to Résolu (à déployer)
commit 2fe89916fdebd9a99231afa0fc024d8a1538167b
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Tue Jan 21 10:45:11 2014 +0100

    backoffice fixes to match wcs changes
#2

Updated by Thomas Noël over 8 years ago

  • Target version set to Au-quotidien 2014.5
#3

Updated by Thomas Noël over 8 years ago

  • Status changed from Résolu (à déployer) to Solution déployée
#4

Updated by Thomas Noël over 8 years ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF