UnicodeDecodeError with Visual Studio files, RB 1.5.4, RBTools-0.3.2 (Python 2.7.1)

2011-03-23 Thread Craig A
I am getting an error similar to what was reported some time ago in
this post:  
http://groups.google.com/group/reviewboard/browse_thread/thread/56fb450ceaef45c1

UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position
1285: ordinal not in range(128)

 I then went in to the rbtools postreview.py file, and changed:
 return content_type, content.encode('utf-8')
 to:
 return content_type, content#.encode('utf-8')

 The user's post-review worked fine after that.

I too am seeing the problem only with Visual Studio 2008 .config
and.csproj files. I examined the postreview.py change that was
reported to fix the problem in the other post, and my version of
postreview.py seems to already have this fix (at the end of
_encode_multipart_formdata)

return content_type, content

The server is Ubuntu (although that likely does not matter since it is
blowing up client-side), installed following the directions from the
documentation.

Client OS is Windows 7 x64, Python info:

Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit
(AMD64)] on win32
Type help, copyright, credits or license for more information.
 import sys
 sys.getdefaultencoding()
'ascii'

We are loving Review Board but the manual process of creating reviews
via the web is too cumbersome, given the relative difficulty of
determining the 'Base Path' (it can be different for different
changesets) for the .patch files created by TortoiseSVN. We got this
patch http://reviews.reviewboard.org/r/2099/diff/ working great to
allow post-review to work with SVN changelists, so our last remaining
hurdle is getting past this encoding error. Thanks for any help you
can provide.

An example problem file can be found at this location:
http://craigandliz.homedns.org/cw/ReviewBoard?action=AttachFiledo=gettarget=web.data.config

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: UnicodeDecodeError with Visual Studio files, RB 1.5.4, RBTools-0.3.2 (Python 2.7.1)

2011-03-25 Thread Craig A
Hi Chris, thanks for taking time to look at this issue.

 If this is a new file the diff will include the BOM.
The file is not new, but in fact the BOM is being introduced as part
of the change (the config file was rewritten using C# XML helper
classes -  that introduces the BOM in the new file)

Here is a visual verification of that:
http://craigandliz.homedns.org/cw/ReviewBoard?action=AttachFiledo=gettarget=BOMDiff.png

 Thanks for making the file available so this could be confirmed.
Just to be complete, here are before and after files:

original file: 
http://craigandliz.homedns.org/cw/ReviewBoard?action=AttachFiledo=gettarget=web.data.config.original
modified file: 
http://craigandliz.homedns.org/cw/ReviewBoard?action=AttachFiledo=gettarget=web.data.config

 Can you post the error, the complete traceback? Along with the version you 
 are using.

Sure, the version of RBTools is 0.3.2. Here is a link to my modified
postreview.py (it is  the stock 0.3.2 version with this diff applied -
 http://reviews.reviewboard.org/r/2099/diff/ ) and the full traceback
is at the bottom of this post.
http://craigandliz.homedns.org/cw/ReviewBoard?action=AttachFiledo=gettarget=postreview.py

 You mention you've customized postreview ...
 is it possible that your new code has the Unicode assumption in
 it rather than the original RBtools.

I don't think so, the relevant line of code looks like this:
 return content_type, content

I don't see any call to .encode('utf-8') - in fact nowhere in the
entire postreview.py is there any encoding from what I can see. I
probably need to go out and brush up on character encoding issues and
figure it out for myself - I was just hoping someone else might have
run into this and solved it already :)

 It is worth your while doing a quick test with a virgin version of the 
 latest RBTools
 (that traceback would be the most helpful to people on the list).
The latest version is 0.3.2 from what I can see at
http://downloads.reviewboard.org/releases/RBTools/0.3/ . I agree, I
will try reinstalling, perhaps with Python 2.6.6 this time.

It is probably worth mentioning that (like in the other posting) I can
upload a TortoiseSVN-generated patch file and Review Board handles it
fine that way. Here is a link to the patch file:
http://craigandliz.homedns.org/cw/ReviewBoard?action=AttachFiledo=gettarget=TortoiseSVN-Gen.patch

Traceback (most recent call last):
  File C:\apps\python\2.7.1\scripts\post-review-script.py, line 8,
in module
load_entry_point('RBTools==0.3.2', 'console_scripts', 'post-
review')()
  File C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py, line 3800, in main
submit_as=options.submit_as)
  File C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py, line 3466, in tempt_fate
parent_diff_content)
  File C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py, line 769, in upload_diff
fields, files)
  File C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py, line 982, in api_post
return self.process_json(self.http_post(path, fields, files))
  File C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py, line 903, in http_post
data = urllib2.urlopen(r).read()
  File C:\apps\python\2.7.1\lib\urllib2.py, line 126, in urlopen
return _opener.open(url, data, timeout)
  File C:\apps\python\2.7.1\lib\urllib2.py, line 392, in open
response = self._open(req, data)
  File C:\apps\python\2.7.1\lib\urllib2.py, line 410, in _open
'_open', req)
  File C:\apps\python\2.7.1\lib\urllib2.py, line 370, in _call_chain
result = func(*args)
  File C:\apps\python\2.7.1\lib\urllib2.py, line 1186, in http_open
return self.do_open(httplib.HTTPConnection, req)
  File C:\apps\python\2.7.1\lib\urllib2.py, line 1155, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
  File C:\apps\python\2.7.1\lib\httplib.py, line 941, in request
self._send_request(method, url, body, headers)
  File C:\apps\python\2.7.1\lib\httplib.py, line 975, in
_send_request
self.endheaders(body)
  File C:\apps\python\2.7.1\lib\httplib.py, line 937, in endheaders
self._send_output(message_body)
  File C:\apps\python\2.7.1\lib\httplib.py, line 795, in
_send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position
689: ordinal not in range(128)

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Converting from utf8 to ISO_8859_8

2012-04-16 Thread Craig Thomasson
Hi all,

When our ReviewBoard site was originally installed, it was setup with
utf8 as the default charset.  I would like to convert it to use an
extended charset like ISO_8859_8 so that we don't get errors when
trying to add cut-n-paste comments from apps that embed extended
chars.

Is there an easy way to do the conversion using rb-site?  Or do I have
to dump the tables, edit the files, and re-create a new site with the
imported data?  We're currently running 1.6.1 and I'm planning to
update to 1.6.5.  If I can make this other change as well, that would
be great.

Thanks!

Craig

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


HELP! Restore from a pg_dump?

2015-03-11 Thread Craig Emery
I've ended up in a sorry situation.

I don't know how I really got into this.
I found lots of this in my /var/log/apache2/error.log
[Sun Mar 08 06:25:22 2015] [error] ERROR:root:Could not load siteconfig: 
relation django_site does not exist
[Sun Mar 08 06:25:22 2015] [error] LINE 1: ...django_site.domain, 
django_site.name FROM django_si...

So I thought I'd 

$ rb-site manage syndb

That seemed to make the site run again, but it's empty.

I haven't been making backups by

$ rb-site manage dumpdb  json-file

I've got a single pg_dump in an SQL file from a day or so before the 
crash.

If I restore using psql I end up with a DB with 0 reviews, no users, 
basically en empty site.

What can I do after the psql invoke to get the site working again, if at 
all?

I've got an immense amount of history, repos, user accounts lost.

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Some broken links

2009-02-02 Thread Craig Fratrik

From http://www.review-board.org/news/ , clicking on New Website
http://www.review-board.org/news/2009/02/02/new-website/

Does not work.

Cheers.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en
-~--~~~~--~~--~--~---