Python论坛  - 讨论区

标题:[python-chinese] turbogears 的向导 的错误

2005年11月16日 星期三 09:46

nile black chengmuliu at gmail.com
Wed Nov 16 09:46:51 HKT 2005

在执行 tg-admi sql create的时候错误

Using database URI sqlite:///D|/TurboGears/wiki20/data
Traceback (most recent call last):
  File "D:\Python24\Scripts\tg-admin-script.py", line 7, in ?
    sys.exit(
  File "d:\python24\lib\site-packages\TurboGears-0.8a3-py2.4.egg\turbogears\comm
and\__init__.py", line 186, in main
    command.run()
  File "d:\python24\lib\site-packages\TurboGears-0.8a3-py2.4.egg\turbogears\comm
and\__init__.py", line 106, in run
    command.the_runner.run(sys.argv)
  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 102, in run
    runner.run()
  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 233, in run
    self.command()
  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 543, in command
    for soClass in self.classes(require_some=True):
  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 255, in classes
    conn = self.connection()
  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 316, in connection
    return sqlobject.connectionForURI(self.options.connection_uri)
  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\dbconn
ection.py", line 913, in connectionForURI
    conn = self.schemeBuilders[scheme]().connectionFromURI(uri)
  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\sqlite
\sqliteconnection.py", line 59, in connectionFromURI
    return cls(filename=path, **args)
  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\sqlite
\sqliteconnection.py", line 21, in __init__
    import sqlite
ImportError: No module named sqlite

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年11月16日 星期三 10:18

limodou limodou at gmail.com
Wed Nov 16 10:18:17 HKT 2005

在 05-11-16,nile black<chengmuliu at gmail.com> 写道:
> 在执行 tg-admi sql create的时候错误
>
> Using database URI sqlite:///D|/TurboGears/wiki20/data
> Traceback (most recent call last):
>   File "D:\Python24\Scripts\tg-admin-script.py", line 7, in ?
>     sys.exit(
>   File "d:\python24\lib\site-packages\TurboGears-0.8a3-py2.4.egg\turbogears\comm
> and\__init__.py", line 186, in main
>     command.run()
>   File "d:\python24\lib\site-packages\TurboGears-0.8a3-py2.4.egg\turbogears\comm
> and\__init__.py", line 106, in run
>     command.the_runner.run(sys.argv)
>   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> r\command.py", line 102, in run
>     runner.run()
>   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> r\command.py", line 233, in run
>     self.command()
>   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> r\command.py", line 543, in command
>     for soClass in self.classes(require_some=True):
>   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> r\command.py", line 255, in classes
>     conn = self.connection()
>   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> r\command.py", line 316, in connection
>     return sqlobject.connectionForURI(self.options.connection_uri)
>   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\dbconn
> ection.py", line 913, in connectionForURI
>     conn = self.schemeBuilders[scheme]().connectionFromURI(uri)
>   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\sqlite
> \sqliteconnection.py", line 59, in connectionFromURI
>     return cls(filename=path, **args)
>   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\sqlite
> \sqliteconnection.py", line 21, in __init__
>     import sqlite
> ImportError: No module named sqlite
>

pysqlite 1.x时的模块名目录是sqlite,到了2.x时就变成了pysqlite2了。看意思是没装pysqlite 1.x模块。装个就行了吧。

--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年11月16日 星期三 11:22

xlp223 myhat123 at gmail.com
Wed Nov 16 11:22:41 HKT 2005

A database. If you don't have one, your best bet is sqlite 3.2+ with
pysqlite 2.0+.
看wiki 20 tutorial,最好装pysqlite 2.0+。

在 05-11-16,limodou<limodou at gmail.com> 写道:
> 在 05-11-16,nile black<chengmuliu at gmail.com> 写道:
> > 在执行 tg-admi sql create的时候错误
> >
> > Using database URI sqlite:///D|/TurboGears/wiki20/data
> > Traceback (most recent call last):
> >   File "D:\Python24\Scripts\tg-admin-script.py", line 7, in ?
> >     sys.exit(
> >   File "d:\python24\lib\site-packages\TurboGears-0.8a3-py2.4.egg\turbogears\comm
> > and\__init__.py", line 186, in main
> >     command.run()
> >   File "d:\python24\lib\site-packages\TurboGears-0.8a3-py2.4.egg\turbogears\comm
> > and\__init__.py", line 106, in run
> >     command.the_runner.run(sys.argv)
> >   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> > r\command.py", line 102, in run
> >     runner.run()
> >   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> > r\command.py", line 233, in run
> >     self.command()
> >   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> > r\command.py", line 543, in command
> >     for soClass in self.classes(require_some=True):
> >   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> > r\command.py", line 255, in classes
> >     conn = self.connection()
> >   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
> > r\command.py", line 316, in connection
> >     return sqlobject.connectionForURI(self.options.connection_uri)
> >   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\dbconn
> > ection.py", line 913, in connectionForURI
> >     conn = self.schemeBuilders[scheme]().connectionFromURI(uri)
> >   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\sqlite
> > \sqliteconnection.py", line 59, in connectionFromURI
> >     return cls(filename=path, **args)
> >   File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\sqlite
> > \sqliteconnection.py", line 21, in __init__
> >     import sqlite
> > ImportError: No module named sqlite
> >
>
> pysqlite 1.x时的模块名目录是sqlite,到了2.x时就变成了pysqlite2了。看意思是没装pysqlite 1.x模块。装个就行了吧。
>
> --
> I like python!
> My Blog: http://www.donews.net/limodou
> NewEdit Maillist: http://groups.google.com/group/NewEdit
>
> _______________________________________________
> Python中文技术讨论邮件列表
> 发言: 发邮件到 python-chinese at lists.python.cn
> 订阅: 发送 subscribe 到 python-chinese-request at lists.python.cn
> 退订: 发送 unsubscribe 到  python-chinese-request at lists.python.cn
> 详细说明: http://python.cn/mailman/listinfo/python-chinese
>
>


--
我的blog:http://xlp223.yculblog.com

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年11月16日 星期三 11:33

limodou limodou at gmail.com
Wed Nov 16 11:33:27 HKT 2005

在 05-11-16,xlp223<myhat123 at gmail.com> 写道:
> A database. If you don't have one, your best bet is sqlite 3.2+ with
> pysqlite 2.0+.
> 看wiki 20 tutorial,最好装pysqlite 2.0+。

如果装pysqlite2的话,是不能直接import sqlite的。而需要
import pysqlite2 as sqlite
才可以和以前兼容呀。

--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年11月16日 星期三 11:39

Qiangning Hong hongqn at gmail.com
Wed Nov 16 11:39:52 HKT 2005

limodou wrote:
> 在 05-11-16,nile black<chengmuliu at gmail.com> 写道:
> 
>>在执行 tg-admi sql create的时候错误
[...]
>>  File "d:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\sqlite
>>\sqliteconnection.py", line 21, in __init__
>>    import sqlite
>>ImportError: No module named sqlite
> 
> pysqlite 1.x时的模块名目录是sqlite,到了2.x时就变成了pysqlite2了。看意思是没装pysqlite 1.x模块。装个就行了吧。

turbogears推荐的是使用pysqlite2。在找不到pysqlite2的时候才会fallback到
1.x。 nile black是两个都没装,所以出错。

把pysqlite2装上就可以了。

-- 
Qiangning Hong, Registered Linux User #396996
My Blog: http://www.hn.org/hongqn
RSS: http://feeds.feedburner.com/hongqn


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年11月16日 星期三 12:03

limodou limodou at gmail.com
Wed Nov 16 12:03:23 HKT 2005

> turbogears推荐的是使用pysqlite2。在找不到pysqlite2的时候才会fallback到
> 1.x。 nile black是两个都没装,所以出错。
>
> 把pysqlite2装上就可以了。
>

哦。没用过。

--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年11月16日 星期三 21:20

nile black chengmuliu at gmail.com
Wed Nov 16 21:20:27 HKT 2005

>pysqlite 1.x时的模块名目录是sqlite,到了2.x时就变成了pysqlite2了。看意思是没装pysqlite
>1.x模块。装个就行了吧。

>turbogears推荐的是使用pysqlite2。在找不到pysqlite2的时候才会fallback到
>1.x。 nile black是两个都没装,所以出错。

>把pysqlite2装上就可以了。

先谢各位了,明天我再试试看,再把结果发上来

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年11月16日 星期三 22:08

Fluke fluke.l at gmail.com
Wed Nov 16 22:08:26 HKT 2005

On 11/16/05, nile black <chengmuliu at gmail.com> wrote:
>
> >pysqlite 1.x时的模块名目录是sqlite,到了2.x时就变成了pysqlite2了。看意思是没装pysqlite
> >1.x模块。装个就行了吧。
>
> >turbogears推荐的是使用pysqlite2。在找不到pysqlite2的时候才会fallback到
> >1.x。 nile black是两个都没装,所以出错。
>
> >把pysqlite2装上就可以了。
>
> 先谢各位了,明天我再试试看,再把结果发上来


我发上来的pysqlite2你好像没受到,可能太大了发不出吧,我试过2是可以的.

_______________________________________________
> Python中文技术讨论邮件列表
> 发言: 发邮件到 python-chinese at lists.python.cn
> 订阅: 发送 subscribe 到 python-chinese-request at lists.python.cn
> 退订: 发送 unsubscribe 到 python-chinese-request at lists.python.cn
> 详细说明: http://python.cn/mailman/listinfo/python-chinese
>
>


--
Yours,
fluke
fluke at sfcube.net
http://sfcube.net/blog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20051116/c7f558db/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号