Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form.pt error #68

Open
cherschel opened this issue Feb 25, 2014 · 2 comments
Open

form.pt error #68

cherschel opened this issue Feb 25, 2014 · 2 comments

Comments

@cherschel
Copy link

The following error happens when running a form in production environement which includes deform_bootstrap. This login form and all other forms work fine on my development machine with deform_bootstrap.
I tried using development form.pt from development partition and tried commenting out things in form.pt I do not understand enough to figure out. Thanks for any help,
Clemens Herschel

[cherschel@web39 phr]$ more pyramid.log
Starting server in PID 28077.
serving on http://0.0.0.0:42467
2014-02-25 21:50:20,863 ERROR [waitress][Dummy-1] Exception when serving /login
Traceback (most recent call last):
File "/home/cherschel/webapps/phr/lib/python2.7/waitress/channel.py", line 329
, in service
task.service()
File "/home/cherschel/webapps/phr/lib/python2.7/waitress/task.py", line 173, i
n service
self.execute()
File "/home/cherschel/webapps/phr/lib/python2.7/waitress/task.py", line 380, i
n execute
app_iter = self.channel.server.application(env, start_response)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/router.py", line 187,
in call
response = self.handle_request(request)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/tweens.py", line 20, i
n excview_tween
response = handler(request)
File "/home/cherschel/webapps/phr/lib/python2.7/site-packages/pyramid_tm-0.4-p
y2.7.egg/pyramid_tm/init.py", line 95, in tm_tween
response = handler(request)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/router.py", line 164,
in handle_request
response = view_callable(context, request)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/config/views.py", line
333, in rendered_view
result = view(context, request)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/config/views.py", line
471, in _requestonly_view
response = view(request)
File "/home/cherschel/webapps/phr/Phr-0.0/phr/views/login.py", line 97, in log
in_view
return {'form':login_form.render(),"heading": 'Login'}
File "/home/cherschel/lib/python2.7/deform/field.py", line 433, in render
return self.serialize(cstruct, readonly=readonly)
File "/home/cherschel/lib/python2.7/deform/field.py", line 408, in serialize
return self.widget.serialize(self, cstruct=cstruct, readonly=readonly)
File "/home/cherschel/lib/python2.7/deform/widget.py", line 982, in serialize
null=null)
File "/home/cherschel/lib/python2.7/deform/template.py", line 117, in call
return self.load(template_name)(**kw)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 125, in cal
l

return self.render(**kwargs)
File "/home/cherschel/lib/python2.7/chameleon/zpt/template.py", line 257, in r
ender
return super(PageTemplate, self).render(*vars)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 169, in rende
r
self.cook_check()
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 293, in cook

check
self.cook(body)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 147, in cook
program = self._cook(body, digest, names)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 218, in _cook
source = self.make(body, builtins)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 249, in make
program = self.parse(body)
File "/home/cherschel/lib/python2.7/chameleon/zpt/template.py", line 202, in p
arse
trim_attribute_space=self.trim_attribute_space,
File "/home/cherschel/lib/python2.7/chameleon/zpt/program.py", line 145, in __
init

super(MacroProgram, self).init(_args, **kwargs)
File "/home/cherschel/lib/python2.7/chameleon/program.py", line 31, in _init
_
for kind, args in parser:
File "/home/cherschel/lib/python2.7/chameleon/parser.py", line 182, in _iter
_
item = self.parse(token)
File "/home/cherschel/lib/python2.7/chameleon/parser.py", line 190, in parse
return visitor(kind, token)
File "/home/cherschel/lib/python2.7/chameleon/parser.py", line 231, in visit_e
nd_tag
raise ParseError("Unexpected end tag.", token)
ParseError: Unexpected end tag.

  • String: ""
  • Filename: /home/cherschel/lib/python2.7/deform_bootstrap-0.2.9-py2.7.egg/de
    form_bootstrap/templates/form.pt
    .7.egg/deform_bootstrap/templates/form.pt

vmware partition-development
Ubuntu
python 2.7
pyramid 1.4
deform_bootstrap .2.1
deform .9.5
Mako .5

webfaction production
centos
python 2.75
pyramid 1.3
Mako .7
deform_bootstrap .2.1

@cherschel cherschel reopened this Feb 25, 2014
@cherschel
Copy link
Author

I removed the deform_bootstrap egg and ran python setup.py install again. Regardless of the form run I get an error that ends with this message:

AttributeError: 'Form' object has no attribute 'autocomplete'

  • Expression: "autocomplete|field.autocomplete"
  • Filename: ... strap-0.2.9-py2.7.egg/deform_bootstrap/templates/form.pt
  • Location: (13:24)
  • Source: autocomplete autocomplete|field.autocomplete;"
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • Arguments: repeat: {...} (0)
    tabify_form: <function tabify_form at 0xa44d684>
    fields_list: {...} (4)
    field: <Form - at 0xaa28fec>
    cstruct: {...} (16)
    inline: False
    null: <_null - at 0xa263a0c>
    [cherschel@web39 phr]$

Can someone point me in a direction to find out how to include the autocomplete attribute in form.pt or where I can look to fix this. Thanks Clemens Herschel

@cherschel
Copy link
Author

OK. I do not like this solution. I installed deform_bootstrap-0.2.1 and it works.
Would appreciate help in above question so I can get a current version working.
Thanks, Clemens Herschel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant