[p4python] AttributeError: 'module' object has no attribute 'P4'
robert at vaccaperna.co.uk
Mon Jun 26 03:54:46 PDT 2006
Looks like the compile extension hasn't been installed properly.
Is there a P4Client.pyd installed as well?
6:49 <DIR> .
6:49 <DIR> ..
4:56 11,447 p4.py
6:49 12,010 p4.pyc
6:49 368,640 P4Client.pyd
Another thing to check is that you don't have any other p4 related stuff in
your python path.
Note that unfortunately the test script has some environment dependencies
for a test perforce repository that is not available to the general public,
thus I would use it as example code rather than as something you can expect
to run without problems.
Hope that helps.
> -----Original Message-----
> From: p4python-bounces at perforce.com
> [mailto:p4python-bounces at perforce.com] On Behalf Of Guillaume Boddaert
> Sent: 26 June 2006 11:35
> To: p4python at perforce.com
> Subject: [p4python] AttributeError: 'module' object has no
> attribute 'P4'
> I am new to Python. I installed both Python 2.4 and p4python
> on windows. p4.py is present in libs\Site-packages.
> Then I try to run the test script without a success.
> C:\Documents and Settings\gboddaer>python
> Traceback (most recent call last):
> File "c:\workspace\HelloPython\test_p4python.py", line 35, in ?
> import p4 # Main class to test
> File "c:\Python24\lib\site-packages\p4.py", line 3, in ?
> """A Python version of the Perforce "p4" client.
> AttributeError: 'module' object has no attribute 'P4'
> I understood that it is a parse error that happens in p4.py
> file. I guess the p4python wrapper is not working properly.
> Where the error would come from ?
> Thanks a lot,
More information about the p4python