Hi. Ran into a problem when trying to publish a post.
Traceback (most recent call last):
File "./charm", line 14, in <module>
ljcharm.main()
File "/home/kmandla/charm-1.9.0/ljcharm.py", line 6172, in main
jobj.do_metaweb(opts, resumeold, xpostfile, template, quick_opt)
File "/home/kmandla/charm-1.9.0/ljcharm.py", line 5734, in do_metaweb
self.main_blog(opts, resumeold, xpostfile, template, quick_opt)
File "/home/kmandla/charm-1.9.0/ljcharm.py", line 5508, in main_blog
self.blog_menu()
File "/home/kmandla/charm-1.9.0/ljcharm.py", line 5455, in blog_menu
repeat_ok = self.blog_post_menu()
File "/home/kmandla/charm-1.9.0/ljcharm.py", line 5380, in blog_post_menu
return self.blog_common_menu("BLOG POSTING MENU", 0)
File "/home/kmandla/charm-1.9.0/ljcharm.py", line 5362, in blog_common_menu
ok = self.go_post(1)
File "/home/kmandla/charm-1.9.0/ljcharm.py", line 2559, in go_post
self.Blogger.PostTime = datetime.datetime.utcnow().isoformat()
NameError: global name 'datetime' is not defined
Editing and updating a post doesn't seem to have this problem, and all other functions are working fine. I'm posting to Wordpress.com, if that helps at all.
Cheers!
Hi kmandla I'm having problems recreating this bug :(
I posted just fine to wordpress.com. What OS are you using, I'm not sure if that has anything to do with it but it might shed some light
It must be something wrong on my end then. I tried it on two completely different computers, one running Arch Linux and another one using Crux. Both show Python 2.6.1 when I ask for the python --version. But on both machines I can configure Charm, connect it to the blog, edit posts, but not post a new one.
I've tried stripping out line 2559 and executing it on its own and it works fine. Is it possible I overlooked a dependency somewhere? I have been known to make that mistake in the past. ... ;)
Cheers and thanks!
P.S.: I'm sorry if this was posted in the wrong "area." Sourceforge's bugtracker is a bit unusual for me. ... :)
epic failure for me, I tried it with python2.6 and got the same error :(
We should probably move this to bugs
At the top of ljcharm.py, under the "try:" block, make feedparser last, and datetime the first import. That will fix it. (Right now it's trying to import feedparser, failing because you don't have it installed, and thus never imports datetime.)
Fixed for the next release.