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

python2.7 #5

Open
gotah opened this issue May 7, 2016 · 2 comments
Open

python2.7 #5

gotah opened this issue May 7, 2016 · 2 comments

Comments

@gotah
Copy link

gotah commented May 7, 2016

Hello!
unfortunately I'm forced to use python2.7 and seems be there is a change in the syntax on how dictionaries are called.

I'm not quite sure on how to modify the sources, could you please show me an example ?

FastCGI-stderr:` Traceback (most recent call last):
FastCGI-stderr:   File "/home/chan/pyib/fcgi.py", line 580, in run
FastCGI-stderr:     protocolStatus, appStatus = self.server.handler(self)
FastCGI-stderr:   File "/home/chan/pyib/fcgi.py", line 1266, in handler
FastCGI-stderr:     result = self.application(environ, start_response)
FastCGI-stderr:   File "/home/chan/pyib/pyib.py", line 47, in __init__
FastCGI-stderr:     self.error(message)
FastCGI-stderr:   File "/home/chan/pyib/pyib.py", line 61, in error
FastCGI-stderr:     self.output += renderTemplate("error.html", {"error": message, "navbar": False})
FastCGI-stderr:   File "/home/chan/pyib/template.py", line 58, in renderTemplate
FastCGI-stderr:     return engine.render("templates/" + template, values)
FastCGI-stderr:   File "/home/chan/pyib/tenjin.py", line 1062, in render
FastCGI-stderr:     content  = template.render(context, globals)
FastCGI-stderr:   File "/home/chan/pyib/tenjin.py", line 759, in render
FastCGI-stderr:     exec self.bytecode in globals, locals
FastCGI-stderr:   File "templates/error.html", line 1, in <module>
FastCGI-stderr:     <?py include('templates/base_top.html') ?>
FastCGI-stderr:   File "/home/chan/pyib/tenjin.py", line 1035, in include
FastCGI-stderr:     return template.render(context, globals, _buf=_buf)
FastCGI-stderr:   File "/home/chan/pyib/tenjin.py", line 759, in render
FastCGI-stderr:     exec self.bytecode in globals, locals
FastCGI-stderr:   File "templates/base_top.html", line 9, in <module>
FastCGI-stderr:     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
FastCGI-stderr: TypeError: 'dict' object is not callable
@gotah
Copy link
Author

gotah commented Aug 26, 2016

Trevor any help ?
thanks

@gotah gotah closed this as completed Aug 26, 2016
@gotah gotah reopened this Aug 26, 2016
@tslocum
Copy link
Owner

tslocum commented Aug 29, 2016

Thanks for the reminder, I missed this the first time around somehow. I just installed and tested PyIB on a VPS with Python 2.7.12 without any issues. Did you modify base_top.html? If so please ensure it is still UTF-8 with UNIX line endings. If that wasn't the problem could you please paste base_top.html somewhere and link to it?

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

2 participants