On 12/08/2013 3:21pm, abhijeet shete wrote:
Hi Folks,

     I ported my project from python2.7 to python3 using 2to3 module.
One of my class is inherited from Exception class, but after porting to
python3 i am getting *No module named 'exceptions' *error.

     My class looks something like this :-


Try it without importing Exception. Looking at django.core.exceptions it seems specifically importing Exception is not required.

*from exceptions import Exception*
*class A(Exception):*
*    def __init__(self, value=None):*
*        self.value = value*
*
*
And the error which I am getting is
*
*
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: No module named 'exceptions'


I tried to import exceptions in python3 shell but there also I am
getting same error.
Is there any problem with my code or did I missed something while
porting or python3 itself has some problem while importing exceptions ?


Thanks and Regards.
Abhijeet Shete

--
You received this message because you are subscribed to the Google
Groups "Django users" 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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Django 
users" 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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to