Strptime Problem with PyLucene

Kyujin Shim lurker86 at gmail.com
Sat Oct 21 14:34:40 EDT 2006


I want to use time module like this.
*mydate = time.strptime('17 Jul 2006 07:23:09 GMT', '%d %b %Y %H:%M:%S %Z')*
But, I have some problem when I run it with PyLucene.

Is there someone know about this problem?

------------------------------------------------------------
(1:351:148)$ python
Python 2.4.4c0 (#2, Jul 30 2006, 15:43:58)
[GCC 4.1.2 20060715 (prerelease) (Debian 4.1.1-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyLucene
WARNING: Error loading security provider gnu.javax.crypto.jce.GnuCrypto:
java.lang.ClassNotFoundException: gnu.javax.crypto.jce.GnuCrypto not found
in [file:./, core:/]
WARNING: Error loading security provider gnu.javax.crypto.jce.GnuSasl:
java.lang.ClassNotFoundException: gnu.javax.crypto.jce.GnuSasl not found in
[file:./, core:/]
WARNING: Error loading security provider gnu.javax.net.ssl.provider.Jessie:
java.lang.ClassNotFoundException: gnu.javax.net.ssl.provider.Jessie not
found in [file:./, core:/]
WARNING: Error loading security provider
gnu.javax.security.auth.callback.GnuCallbacks:
java.lang.ClassNotFoundException:
gnu.javax.security.auth.callback.GnuCallbacks not found in [file:./, core:/]
>>> import time
>>> mydate = time.strptime('17 Jul 2006 07:23:09 GMT', '%d %b %Y %H:%M:%S
%Z')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/_strptime.py", line 293, in strptime
raise ValueError("time data did not match format: data=%s fmt=%s" %
ValueError: time data did not match format: data=17 Jul 2006 07:23:09 GMT
fmt=%d %b %Y %H:%M:%S %Z
>>>

----------------------------------------------

This works fine.
------------------------------
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strptime('17 Jul 2006 07:23:09 GMT', '%d %b %Y %H:%M:%S %Z')
(2006, 7, 17, 7, 23, 9, 0, 198, 0)
>>>
---------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061022/13521cee/attachment.html>


More information about the Python-list mailing list