post-review import error

124 views
Skip to first unread message

Kalli

unread,
Jul 1, 2008, 7:05:07 PM7/1/08
to reviewboard
Hi,

I'm getting this error when I try to run post-review. Any ideas?

karl amhs $ python ~/bin/post-review.py -d
Traceback (most recent call last):
File "/home/karl/bin/post-review.py", line 3, in ?
import cookielib
File "/home/karl/bin/cookielib.py", line 1788, in ?
from _LWPCookieJar import LWPCookieJar, lwp_cookie_str
ImportError: No module named _LWPCookieJar

Christian Hammond

unread,
Jul 1, 2008, 7:45:26 PM7/1/08
to revie...@googlegroups.com
What's cookelib.py doing in your bin directory?

cookielib comes with Python, provided your version of Python is new enough. What does python --version say?

Christian


--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Kalli

unread,
Jul 2, 2008, 6:06:06 AM7/2/08
to reviewboard
cookielib.py is in this directory because post-review complained about
the module was missing. So I downloaded it and placed it in the same
directory as post-review while testing it.

I have to admit, the Python version I have is 2.3.4. I know it is
supposed to be 2.4 or later on the server, but I didn't think of
updating it on the desktop. I have installed version 2.5.2.

Now I get this error:
Traceback (most recent call last):
File "/home/karl/bin/post-review.py", line 8, in <module>
import simplejson
ImportError: No module named simplejson

Thanks,
Karl

On Jul 1, 11:45 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> What's cookelib.py doing in your bin directory?
>
> cookielib comes with Python, provided your version of Python is new enough.
> What does python --version say?
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.

Christian Hammond

unread,
Jul 2, 2008, 6:14:33 AM7/2/08
to revie...@googlegroups.com
Yeah, you absolutely need 2.4 or higher. 2.3 won't work at all.

If you have the Python setuptools installed, you should be able to run:

easy_install simplejson

That will fetch and install the simplejson module.

If it complains, you may have to install setuptools manually.

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Kalli

unread,
Jul 2, 2008, 6:26:35 AM7/2/08
to reviewboard
Ok. I reinstalled simplesjon and got one step further.
Now I'm getting "Unable to find a Review Board server for this source
code tree.
". I think it is a matter of setting "REVIEWBOARD_URL = "http://
10.10.10.55:80"" in post-review.py.

On Jul 1, 11:45 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> What's cookelib.py doing in your bin directory?
>
> cookielib comes with Python, provided your version of Python is new enough.
> What does python --version say?
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.

Kalli

unread,
Jul 2, 2008, 6:59:31 AM7/2/08
to reviewboard
Now I have a real problem and am stuck.

I moved the line "REVIEWBOARD_URL = "http://10.10.10.55""
to .reviewboardrc in the root of the CVS archive.
Now I get:
>>> Repository info 'Path: cvs.tern.is:/home/CVS_ARCHIVE, Base path: None, Supports changesets: False'
>>> cvs diff -u AMHSSettings.cpp
>>> Looking for '10.10.10.55 /' cookie in /home/karl/.post-review-cookies.txt
>>> Loaded valid cookie -- no login required
>>> Attempting to create review request for None
>>> HTTP POSTing to http://10.10.10.55/api/json/reviewrequests/new/: {'repository_path': 'cvs.tern.is:/home/CVS_ARCHIVE'}
Error creating review request: The repository path specified is not in
the list of known repositories (code 206)

I have defined a repository in reviewboard
as: :pserver:myName:myPas...@cvs.tern.is:/home/CVS_ARCHIVE
cat CVS/Root returns: :pserver:myN...@cvs.tern.is:/home/CVS_ARCHIVE

Christian Hammond

unread,
Jul 2, 2008, 7:01:54 PM7/2/08
to revie...@googlegroups.com
Your repository information should be:

Server Name: cvs.tern.is:/home/CVS_ARCHIVE

Without the username, password, or :pserver:.

Then set the username and password fields. Review Board will then build the right repository path to compare against.

Christian


--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Kalli

unread,
Jul 3, 2008, 6:07:04 AM7/3/08
to reviewboard
Thank you Christian,

That solved my problem.

Regards,
Karl

On Jul 2, 11:01 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> Your repository information should be:
>
> Server Name: cvs.tern.is:/home/CVS_ARCHIVE
>
> Without the username, password, or :pserver:.
>
> Then set the username and password fields. Review Board will then build the
> right repository path to compare against.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.
>
> On Wed, Jul 2, 2008 at 3:59 AM, Kalli <k...@tern.is> wrote:
>
> > Now I have a real problem and am stuck.
>
> > I moved the line "REVIEWBOARD_URL = "http://10.10.10.55""
> > to .reviewboardrc in the root of the CVS archive.
> > Now I get:
> > >>> Repository info 'Path: cvs.tern.is:/home/CVS_ARCHIVE, Base path: None,
> > Supports changesets: False'
> > >>> cvs diff -u AMHSSettings.cpp
> > >>> Looking for '10.10.10.55 /' cookie in
> > /home/karl/.post-review-cookies.txt
> > >>> Loaded valid cookie -- no login required
> > >>> Attempting to create review request for None
> > >>> HTTP POSTing tohttp://10.10.10.55/api/json/reviewrequests/new/:
> > {'repository_path': 'cvs.tern.is:/home/CVS_ARCHIVE'}
> > Error creating review request: The repository path specified is not in
> > the list of known repositories (code 206)
>
> > I have defined a repository in reviewboard
> > as: :pserver:myName:myPassw...@cvs.tern.is:/home/CVS_ARCHIVE
Reply all
Reply to author
Forward
0 new messages