Discussion:
Error in current trunk
Wichert Akkerman
2008-09-20 12:43:59 UTC
Permalink
After being away on vacation for a few weeks I did an svn up of z3c.pt, but
it seems things are quite broken now. Every template render attempt results
in this error:


File
"/local/simplon/2style4you/code/buildout/devel/src/tostyle4you/tostyle4you/lib/pt
.py", line 11, in render_template
template = globs["app_globals"].pt_loader.load_page(template_name)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",

line 47, in load_page
return self._load(filename, PageTemplateFile)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",

line 10, in load
self.registry[args] = template = func(self, *args)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",

line 39, in _load
path, self.parser, auto_reload=self.auto_reload)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/pagetemplate
.py", line 48, in __init__
doctype, **kwargs)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/template.py"
, line 107, in __init__
filename, filecache.TemplateCache(filename))
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/filecache.py
", line 9, in __init__
self.load()
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/filecache.py
", line 37, in load
self.registry = pickle.load(f)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/translation.
py", line 710, in __setstate__
self.__dict__.update(GhostedByteCodeTemplate.rebuild(state))
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/translation.
py", line 747, in rebuild
symbols = state['symbols']
KeyError: 'symbols'

the z3c.pt tests all run correctly. Did something change that requires me to
adjust my code?

Wichert.
--
Wichert Akkerman <***@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "z3c.pt" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to z3c_pt+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/z3c_pt?hl=en
-~----------~----~----~----~------~----~------~--~---
Chris McDonough
2008-09-20 15:36:29 UTC
Permalink
Try blowing away all your *.cache files.

- C
Post by Wichert Akkerman
After being away on vacation for a few weeks I did an svn up of z3c.pt, but
it seems things are quite broken now. Every template render attempt results
File
"/local/simplon/2style4you/code/buildout/devel/src/tostyle4you/tostyle4you/lib/pt
.py", line 11, in render_template
template = globs["app_globals"].pt_loader.load_page(template_name)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 47, in load_page
return self._load(filename, PageTemplateFile)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 10, in load
self.registry[args] = template = func(self, *args)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 39, in _load
path, self.parser, auto_reload=self.auto_reload)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/pagetemplate
.py", line 48, in __init__
doctype, **kwargs)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/template.py"
, line 107, in __init__
filename, filecache.TemplateCache(filename))
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/filecache.py
", line 9, in __init__
self.load()
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/filecache.py
", line 37, in load
self.registry = pickle.load(f)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/translation.
py", line 710, in __setstate__
self.__dict__.update(GhostedByteCodeTemplate.rebuild(state))
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/translation.
py", line 747, in rebuild
symbols = state['symbols']
KeyError: 'symbols'
the z3c.pt tests all run correctly. Did something change that requires me to
adjust my code?
Wichert.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "z3c.pt" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to z3c_pt+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/z3c_pt?hl=en
-~----------~----~----~----~------~----~------~--~---
Malthe Borch
2008-09-20 16:14:22 UTC
Permalink
Yes, unfortunately we don't have a mechanism that blows the cache when
the package is updated.

\malthe
Post by Chris McDonough
Try blowing away all your *.cache files.
- C
Post by Wichert Akkerman
After being away on vacation for a few weeks I did an svn up of z3c.pt, but
it seems things are quite broken now. Every template render attempt results
File
"/local/simplon/2style4you/code/buildout/devel/src/tostyle4you/tostyle4you/lib/pt
.py", line 11, in render_template
template = globs["app_globals"].pt_loader.load_page(template_name)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 47, in load_page
return self._load(filename, PageTemplateFile)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 10, in load
self.registry[args] = template = func(self, *args)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 39, in _load
path, self.parser, auto_reload=self.auto_reload)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/pagetemplate
.py", line 48, in __init__
doctype, **kwargs)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/template.py"
, line 107, in __init__
filename, filecache.TemplateCache(filename))
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/filecache.py
", line 9, in __init__
self.load()
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/filecache.py
", line 37, in load
self.registry = pickle.load(f)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/translation.
py", line 710, in __setstate__
self.__dict__.update(GhostedByteCodeTemplate.rebuild(state))
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/translation.
py", line 747, in rebuild
symbols = state['symbols']
KeyError: 'symbols'
the z3c.pt tests all run correctly. Did something change that requires me to
adjust my code?
Wichert.
--
--=====================--
mail: ***@gmail.com
homepage: zeitmaschine.dk
--=====================--

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "z3c.pt" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to z3c_pt+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/z3c_pt?hl=en
-~----------~----~----~----~------~----~------~--~---
Wichert Akkerman
2008-09-20 17:07:49 UTC
Permalink
Thanks, that solved it. It wouldn't surprise me if this will become a
FAQ at some point. Would it be possible to stash an ABI counter in the
cache files which is checked on load?

Wichert.
Post by Chris McDonough
Try blowing away all your *.cache files.
- C
Post by Wichert Akkerman
After being away on vacation for a few weeks I did an svn up of z3c.pt, but
it seems things are quite broken now. Every template render attempt results
File
"/local/simplon/2style4you/code/buildout/devel/src/tostyle4you/tostyle4you/lib/pt
.py", line 11, in render_template
template = globs["app_globals"].pt_loader.load_page(template_name)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 47, in load_page
return self._load(filename, PageTemplateFile)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 10, in load
self.registry[args] = template = func(self, *args)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/loader.py",
line 39, in _load
path, self.parser, auto_reload=self.auto_reload)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/pagetemplate
.py", line 48, in __init__
doctype, **kwargs)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/template.py"
, line 107, in __init__
filename, filecache.TemplateCache(filename))
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/filecache.py
", line 9, in __init__
self.load()
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/filecache.py
", line 37, in load
self.registry = pickle.load(f)
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/translation.
py", line 710, in __setstate__
self.__dict__.update(GhostedByteCodeTemplate.rebuild(state))
File
"/local/simplon/2style4you/code/buildout/devel/src/z3c.pt/src/z3c/pt/translation.
py", line 747, in rebuild
symbols = state['symbols']
KeyError: 'symbols'
the z3c.pt tests all run correctly. Did something change that requires me to
adjust my code?
Wichert.
--
Wichert Akkerman<***@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "z3c.pt" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to z3c_pt+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/z3c_pt?hl=en
-~----------~----~----~----~------~----~------~--~---
Malthe Borch
2008-09-20 17:14:35 UTC
Permalink
Thanks, that solved it. It wouldn't surprise me if this will become a FAQ at
some point. Would it be possible to stash an ABI counter in the cache files
which is checked on load?
I'm sure an ABI counter will work, but you'll have to explain what it
is first :-) Do you mean that whenever we make a cache format change,
we should increase some integer?

\malthe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "z3c.pt" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to z3c_pt+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/z3c_pt?hl=en
-~----------~----~----~----~------~----~------~--~---
Wichert Akkerman
2008-09-20 17:17:02 UTC
Permalink
Post by Malthe Borch
Thanks, that solved it. It wouldn't surprise me if this will become a FAQ at
some point. Would it be possible to stash an ABI counter in the cache files
which is checked on load?
I'm sure an ABI counter will work, but you'll have to explain what it
is first :-) Do you mean that whenever we make a cache format change,
we should increase some integer?
Just a counter that you update whenever the binary interface changes,
which in this case would be the interface between what the .cache files
use and what z3c.pt provides.

Wichert.
--
Wichert Akkerman<***@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "z3c.pt" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to z3c_pt+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/z3c_pt?hl=en
-~----------~----~----~----~------~----~------~--~---
Loading...