------------------------------------------------------------------------------
To reply, visit https://hellosplat.com/s/beanbag/tickets/4519/
------------------------------------------------------------------------------

New ticket #4519 by kyz
For Beanbag, Inc. > Review Board

Status: New
Tags: Priority:Medium, Type:Defect


------------------------------------------------------------------------------
ImportError: No module named exceptions
==============================================================================

# What version are you running?

ReviewBoard 2.5.8

# What's the URL of the page containing the problem?

/reviews/

# What steps will reproduce the problem?
1. Load main review requests list on ReviewBoard 2.5.8

# What is the expected output? What do you see instead?

Expected: page. Result: 500 internal server error

# What operating system are you using? What browser?

RHEL 6, Python 2.6.6

pytz module version 2010h  (I used easy_install --upgrade ReviewBoard to go 
from ReviewBoard 2.5.7 to 2.5.8, and the ReviewBoard dependencies are such that 
easy_install didn't see a need to upgrade pytz from this version)

# Please provide any additional information below.

Part of the the traceback from wsgi log:

ERROR:root:Unable to load webapi resource review_request: No module named 
exceptions
Traceback (most recent call last):
  File 
"/usr/lib/python2.6/site-packages/Djblets-0.9.5-py2.6.egg/djblets/webapi/resources/registry.py",
 line 65, in __getattr__
    {}, {}, [instance_name])
  File 
"/usr/lib/python2.6/site-packages/ReviewBoard-2.5.8-py2.6.egg/reviewboard/webapi/resources/review_request.py",
 line 22, in <module>
    from pytz.exceptions import AmbiguousTimeError
ImportError: No module named exceptions

Looking at the code, it's because in pytz version 2010h has AmbiguousTimeError 
class defined in pytz.tzinfo, not pytz.exceptions

This diff fixes the problem:

--- 
/usr/lib/python2.6/site-packages/ReviewBoard-2.5.8-py2.6.egg/reviewboard/webapi/resources/review_request.py.orig
    2017-02-10 14:27:23.143549455 +0000
+++ 
/usr/lib/python2.6/site-packages/ReviewBoard-2.5.8-py2.6.egg/reviewboard/webapi/resources/review_request.py
 2017-02-10 14:27:53.475549455 +0000
@@ -19,7 +19,7 @@
                                    INVALID_FORM_DATA,
                                    NOT_LOGGED_IN,
                                    PERMISSION_DENIED)
-from pytz.exceptions import AmbiguousTimeError
+from pytz.tzinfo import AmbiguousTimeError
 
 from reviewboard.admin.server import build_server_url
 from reviewboard.diffviewer.errors import (DiffTooBigError,



------------------------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to