Closed Seele0oO closed 1 year ago
2023-02-27 10:20:21,264: building site
Traceback (most recent call last):
File "/usr/local/bin/tg-archive", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/tgarchive/__init__.py", line 161, in main
b.build()
File "/usr/local/lib/python3.10/dist-packages/tgarchive/build.py", line 87, in build
self._render_page(messages, month, dayline,
File "/usr/local/lib/python3.10/dist-packages/tgarchive/build.py", line 116, in _render_page
html = self.template.render(config=self.config,
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 90, in top-level template code
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 485, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute '2019-10-25'
there is some error.
same error in another tg-archive project
2023-02-27 10:24:18,143: building site
Traceback (most recent call last):
File "/usr/local/bin/tg-archive", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/tgarchive/__init__.py", line 161, in main
b.build()
File "/usr/local/lib/python3.10/dist-packages/tgarchive/build.py", line 87, in build
self._render_page(messages, month, dayline,
File "/usr/local/lib/python3.10/dist-packages/tgarchive/build.py", line 116, in _render_page
html = self.template.render(config=self.config,
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 90, in top-level template code
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 485, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute '2020-06-01'
hmm, investigating this.
Thank you for your attention.
Unable to reproduce this.
timezone
config?Tried Asia/Shanghai
and it works fine on a site with messages that span multiple years. Maybe there is one particular entry in your DB that's somehow being counted as UTC (in the get_timeline()
method perhaps) and with a timezone when generating the message. I missed adding timezone support to get_timeline()
and get_dayline()
. Will add a push a fix.
Can you try v1.1.1
?
2023-02-27 12:19:00,746: building site
Traceback (most recent call last):
File "/usr/local/bin/tg-archive", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/tgarchive/__init__.py", line 161, in main
b.build()
File "/usr/local/lib/python3.10/dist-packages/tgarchive/build.py", line 87, in build
self._render_page(messages, month, dayline,
File "/usr/local/lib/python3.10/dist-packages/tgarchive/build.py", line 116, in _render_page
html = self.template.render(config=self.config,
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 90, in top-level template code
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 485, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute '2019-10-25'
tg-archive -v
v1.1.1
it's a bad news.
@knadh I noticed this again as I have in trying to update all the packages, currently removing the softlinks in the build parameter, I think it may work, due to the number of media files in the message it may take a few hours to know the exact result. If it still fails, I will try to do some testing in github action.
It doesn't seem feasible, but I made a github action to do automatic testing.
Hi @Seele0oO have you figured anything yet? It is caused by using --symlinks
option? Anything I can to do help fix?
@scarlion1 I apologize for the long delay in responding. It may not have been a problem with my judgment, now I have to go back to version 1.0.0.
@Seele0oO No worries, we are still working on it over on #99
The default TZ is utc+0. I think it would be more helpful to the visitors of the site if this feature is added.