[Trac] 'module' object has no attribute 'connect'

Jeffrey E. Forcier jforcier at strozllc.com
Fri Jun 10 10:06:17 CDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There are no stupid questions, only stupid answers :)

I'm afraid my RedHat knowledge is rather dated, so I can't be a ton  
of help, but I'll try.

If you're using the command line RPM utility, do 'man rpm' and try to  
muddle through that, you should see options for using it to list what  
packages you currently have installed, and info on them. Or if you're  
using some graphical package manager, use that instead to do the same  
thing.

If you can do that, you should be able to see what version of  
pysqlite you have installed. Assuming it's the wrong version, look  
wherever you got the one you have now and see if they have the other  
version.

You could build from source, but even on RedHat that's not a great  
option as it makes it harder to update or remove later on.

Good luck,
Jeff

On Jun 10, 2005, at 10:45 AM, Eric Coleman wrote:

> How do I check which version of these I have, and how do I go about  
> removing them?
>
> Also, what's the best installation to do? should I build them from  
> source?
>
> Sorry if they are stupid questions.. im kind of a moron
>
> - Eric
>
> Jeffrey E. Forcier wrote:
>> You probably don't have the right version of py-sqlite, I had the   
>> same error a week ago, and after investigation it seems there are  
>> two  fairly different versions of that library.
>>
>> Now, I'm using DarwinPorts on Mac OS X, so I don't know if this  
>> is  their fault or the upstream maintainers' fault, but in case  
>> it's the  latter, I'll explain the problem I had.
>>
>> In my package list I have *two* oddly-named/versioned instances of  
>> py- sqlite, as follows:
>>
>> py-sqlite    python/py-sqlite    2.0.3    python database  
>> extension  for sqlite
>> py-sqlite2    python/py-sqlite2    1.0.1    python database  
>> extension  for sqlite2
>>
>> Further confusing the matter is that there's two versions of  
>> SQLite  itself:
>>
>> sqlite    databases/sqlite    2.8.15    an embedded SQL database  
>> engine
>> sqlite3    databases/sqlite3    3.2.1    an embedded SQL database  
>> engine
>>
>> Anyway, what Trac appears to expect is SQLite 2.x with py-sqlite2  
>> 1.x.
>>
>> The difference is that py-sqlite2 implements the Python Database  
>> API  2.0 (PEP 249, http://www.python.org/peps/pep-0249.html) which  
>> is what  the Trac python code uses, and py-sqlite does not. So,  
>> you're  probably using py-sqlite, which doesn't have a  
>> 'pysqlite.connect()'  function, thus generating the error you see.
>>
>>
>> I hope this helps instead of just being a bunch of junk :)
>>
>> Regards,
>> Jeff
>>
>> On Jun 10, 2005, at 3:12 AM, Eric Coleman wrote:
>>
>>> Each time I try to create a trac environment, I get the following:
>>>
>>> Creating and Initializing Project
>>> Failed to create environment. 'module' object has no attribute   
>>> 'connect'
>>> Failed to initialize database. 1
>>>
>>>
>>> Im pretty new to all this linux stuff, is there something  
>>> specific  you need to know?  Im running RHEL 3, subversion 1.2,  
>>> python 2.4.1
>>>
>>> - Eric
>>> No virus found in this outgoing message.
>>> Checked by AVG Anti-Virus.
>>> Version: 7.0.323 / Virus Database: 267.6.6 - Release Date: 6/8/2005
>>> _______________________________________________
>>> Trac mailing list
>>> Trac at lists.edgewall.com
>>> http://lists.edgewall.com/mailman/listinfo/trac
>>>
>>
>>
>> -- 
>> Jeffrey E. Forcier
>> Junior Developer, Research and Development
>> Stroz Friedberg, LLC
>> 15 Maiden Lane, 12th Floor
>> New York, NY 10038
>> [main]212-981-6540 [direct]212-981-6546
>> http://www.strozllc.com
>>
>> This message is for the named person's use only.  It may contain
>> confidential, proprietary or legally privileged information. No  
>> right to
>> confidential or privileged treatment of this message is waived or  
>> lost
>> by any error in transmission.  If you have received this message in
>> error, please immediately notify the sender by e-mail or by  
>> telephone at
>> 212.981.6540, delete the message and all copies from your system and
>> destroy any hard copies.  You must not, directly or indirectly, use,
>> disclose, distribute, print or copy any part of this message if  
>> you are
>> not the intended recipient.
>>
>> _______________________________________________
>> Trac mailing list
>> Trac at lists.edgewall.com
>> http://lists.edgewall.com/mailman/listinfo/trac
>>
>>
>>
>>
> <mime-attachment.txt>
> <mime-attachment.txt>


- --
Jeffrey E. Forcier
Junior Developer, Research and Development
Stroz Friedberg, LLC
15 Maiden Lane, 12th Floor
New York, NY 10038
[main]212-981-6540 [direct]212-981-6546
http://www.strozllc.com

This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information. No right to
confidential or privileged treatment of this message is waived or lost
by any error in transmission.  If you have received this message in
error, please immediately notify the sender by e-mail or by telephone at
212.981.6540, delete the message and all copies from your system and
destroy any hard copies.  You must not, directly or indirectly, use,
disclose, distribute, print or copy any part of this message if you are
not the intended recipient.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFCqaxpp45MMXK8DgERAuJQAJ9gFbijhrWv9wg+TM94QN5AxiXEFACg4OVl
TXsT92BkUO9/C1YcdSnuro4=
=YpUo
-----END PGP SIGNATURE-----


More information about the Trac mailing list