Python 3 is a Really Good Idea. Unfortunately, as you have discovered, many modules do not yet support Python 3. Stick with 2.7 to save yourself head/heart-ache.
On Sat, Mar 1, 2014 at 12:57 PM, Tom Brander <[email protected]> wrote: > Took a look, and xhtml2pdf is not P3 capable either > > > On Friday, February 28, 2014 6:43:45 AM UTC-6, Tom Brander wrote: >> >> It is probably beyond my level, but I'll try to take a look at the >> replacement xhtml2pdf.... >> >> On Thursday, February 27, 2014 6:51:08 PM UTC-6, Danny S wrote: >>> >>> Ok, so I've created a pull request adding reportlab 2.7 as a dependency >>> for cartridge: >>> https://github.com/stephenmcd/cartridge/pull/181 >>> >>> And also opened an issue so we can potentially work on upgrading to use >>> xhtml2pdf in future: >>> https://github.com/stephenmcd/cartridge/issues/180 >>> >>> Hope this helps. >>> >>> Seeya. Danny. >>> PS. Tom, feel free to work on that issue, if you want! >>> >>> >>> >>> On 28 February 2014 11:05, Stephen McDonald <[email protected]> wrote: >>> >>>> Yep sounds good >>>> >>>> >>>> On Fri, Feb 28, 2014 at 11:33 AM, Danny <[email protected]> wrote: >>>> >>>>> Tom's pointed out in a private email that he's working with Python 3, >>>>> and reportlab 2.7 won't work on Python 3. >>>>> >>>>> I'm still using python 2.7, so using an older reportlab is fine for me. >>>>> >>>>> Should I still go ahead with the change to cartridge's setup.py >>>>> (adding reportlab==2.7 as a dependency) or should we look at trying and >>>>> solving the larger issue? >>>>> >>>>> Seeya. Danny. >>>>> >>>>> >>>>> >>>>> On 28 February 2014 10:55, Stephen McDonald <[email protected]> wrote: >>>>> >>>>>> Thanks a lot that'd be great! >>>>>> >>>>>> >>>>>> On Fri, Feb 28, 2014 at 11:23 AM, Danny <[email protected]> wrote: >>>>>> >>>>>>> I'd say so, Stephen, at least until cartridge can be updated to use >>>>>>> xhtml2pdf instead of pisa (which seems to be an abandoned project). >>>>>>> >>>>>>> At the moment, there's no dependency on reportlab in cartridge (only >>>>>>> pisa), but because pisa doesn't have reportlab in its own dependency >>>>>>> list, >>>>>>> it couldn't hurt specifying the versions that cartridge needs. >>>>>>> >>>>>>> I'll create a pull request, if you like? >>>>>>> >>>>>>> Seeya. Danny. >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 28 February 2014 10:49, Stephen McDonald <[email protected]> wrote: >>>>>>> >>>>>>>> Thanks Danny - I'm not really across the issue, do you think we >>>>>>>> need to specify that exact reportlab version in Cartridge's setup.py? >>>>>>>> >>>>>>>> >>>>>>>> On Fri, Feb 28, 2014 at 11:17 AM, Danny <[email protected]> wrote: >>>>>>>> >>>>>>>>> Best option for now is to downgrade reportlab to 2.7 (I did that >>>>>>>>> on my site this morning, after this discussion!) >>>>>>>>> >>>>>>>>> Just add reportlab==2.7 to your requirements/project.txt and do a >>>>>>>>> pip install -U -r requirements/project.txt >>>>>>>>> >>>>>>>>> Seeya. Danny. >>>>>>>>> >>>>>>>>> >>>>>>>>> On 28 February 2014 10:45, Tom Brander <[email protected]> wrote: >>>>>>>>> >>>>>>>>>> Tried to used the fix suggested but still getting the same error >>>>>>>>>> (FWIW I never did get the message version 2.2 or higher needed),, so >>>>>>>>>> I'm >>>>>>>>>> suspecting pisa is a no go with Python 3 and that it is simply >>>>>>>>>> failing?? >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Posted question in the xhtml2pdf group, linked below: >>>>>>>>>> >>>>>>>>>> https://groups.google.com/d/msg/xhtml2pdf/mihS51DtZkU/ >>>>>>>>>> P5zuIvLlC-0J >>>>>>>>>> >>>>>>>>>> Error: >>>>>>>>>> Exception Value: >>>>>>>>>> >>>>>>>>>> invalid syntax (__init__.py, line 43) >>>>>>>>>> >>>>>>>>>> Exception Location:/home/tom/myvenv3/lib/python3. >>>>>>>>>> 3/site-packages/ho/pisa/__init__.py in <module>, line 26 Python >>>>>>>>>> Executable:/home/tom/myvenv3/bin/python Python Version: 3.3.2 >>>>>>>>>> >>>>>>>>>> On Thursday, February 27, 2014 8:05:02 AM UTC-6, Tom Brander >>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>> Thanks so much!! now I know where to look.. >>>>>>>>>>> >>>>>>>>>>> BTW Shouldn't both reportlab and pillow be in the requirements >>>>>>>>>>> txt file?? They were the only two I needed to download separately.. >>>>>>>>>>> >>>>>>>>>>> On Wednesday, February 26, 2014 5:42:18 PM UTC-6, Danny S wrote: >>>>>>>>>>>> >>>>>>>>>>>> The error is coming from sx/pisa3/__init__.py, line 43 which >>>>>>>>>>>> says: >>>>>>>>>>>> >>>>>>>>>>>> {{{ >>>>>>>>>>>> if not REPORTLAB22: >>>>>>>>>>>> raise ImportError, "Reportlab Toolkit Version 2.2 or >>>>>>>>>>>> higher needed" >>>>>>>>>>>> }}} >>>>>>>>>>>> >>>>>>>>>>>> Now, obviously you do have reportlab of a version higher than >>>>>>>>>>>> 2.2 but >>>>>>>>>>>> there was a bug mentioned on the cartridge issues a few weeks >>>>>>>>>>>> ago which >>>>>>>>>>>> seemed to indicate that reportlab 3.0 isn't reporting its >>>>>>>>>>>> version >>>>>>>>>>>> correctly as higher than 2.2. >>>>>>>>>>>> >>>>>>>>>>>> See https://github.com/stephenmcd/cartridge/issues/174# >>>>>>>>>>>> issuecomment-35755887 >>>>>>>>>>>> >>>>>>>>>>>> It seems like it's a known bug in pisa. >>>>>>>>>>>> >>>>>>>>>>>> Hope this helps. >>>>>>>>>>>> >>>>>>>>>>>> Seeya. Danny. >>>>>>>>>>>> >>>>>>>>>>>> On 27/02/2014 9:52 AM, Tom Brander wrote: >>>>>>>>>>>> > Hmm did not have reportlab, so I installed it but no change, >>>>>>>>>>>> here is the >>>>>>>>>>>> > pip list >>>>>>>>>>>> > (myvenv3) tom@tom-sam:~/whiteplume$ pip list >>>>>>>>>>>> > bleach (1.4) >>>>>>>>>>>> > Cartridge (0.9.2) >>>>>>>>>>>> > Django (1.6.2) >>>>>>>>>>>> > filebrowser-safe (0.3.2) >>>>>>>>>>>> > future (0.9.0) >>>>>>>>>>>> > grappelli-safe (0.3.6) >>>>>>>>>>>> > html5lib (0.999) >>>>>>>>>>>> > Mezzanine (3.0.9) >>>>>>>>>>>> > oauthlib (0.6.1) >>>>>>>>>>>> > Pillow (2.3.0) >>>>>>>>>>>> > pip (1.5.4) >>>>>>>>>>>> > pisa (3.0.33) >>>>>>>>>>>> > pytz (2013.9) >>>>>>>>>>>> > reportlab (3.0) >>>>>>>>>>>> > requests (2.2.1) >>>>>>>>>>>> > requests-oauthlib (0.4.0) >>>>>>>>>>>> > setuptools (2.2) >>>>>>>>>>>> > six (1.5.2) >>>>>>>>>>>> > tzlocal (1.0) >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > On Wednesday, February 26, 2014 3:43:49 PM UTC-6, Danny S >>>>>>>>>>>> wrote: >>>>>>>>>>>> > >>>>>>>>>>>> > On 27/02/2014 7:29 AM, Tom Brander wrote: >>>>>>>>>>>> > > Went to create a pdf invoice and got this error: >>>>>>>>>>>> > > I am using Python #.3 if that makes a diff?? >>>>>>>>>>>> > > Does not give me much to go on the "view" invoice is >>>>>>>>>>>> working fine... >>>>>>>>>>>> > >>>>>>>>>>>> > Can you do a pip list for us? >>>>>>>>>>>> > >>>>>>>>>>>> > Do you have pisa and reportlab both installed? What >>>>>>>>>>>> versions? >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > > >>>>>>>>>>>> > > Traceback: >>>>>>>>>>>> > > File >>>>>>>>>>>> > > >>>>>>>>>>>> > "/home/tom/myvenv3/lib/python3.3/site-packages/ >>>>>>>>>>>> django/core/handlers/base.py" >>>>>>>>>>>> > >>>>>>>>>>>> > > in get_response >>>>>>>>>>>> > > 107. response = >>>>>>>>>>>> middleware_method(request, >>>>>>>>>>>> > > callback, callback_args, callback_kwargs) >>>>>>>>>>>> > > File >>>>>>>>>>>> > > >>>>>>>>>>>> > >>>>>>>>>>>> > "/home/tom/myvenv3/lib/python3.3/site-packages/mezzanine/pages/middleware.py" >>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>> > > in process_view >>>>>>>>>>>> > > 78. response = view_func(request, >>>>>>>>>>>> *view_args, >>>>>>>>>>>> > **view_kwargs) >>>>>>>>>>>> > > File >>>>>>>>>>>> > > >>>>>>>>>>>> > >>>>>>>>>>>> > "/home/tom/myvenv3/lib/python3.3/site-packages/cartridge/shop/views.py" >>>>>>>>>>>> >>>>>>>>>>>> > > in invoice >>>>>>>>>>>> > > 358. import ho.pisa >>>>>>>>>>>> > > File >>>>>>>>>>>> > >>>>>>>>>>>> > "/home/tom/myvenv3/lib/python3.3/site-packages/ho/pisa/__init__.py" >>>>>>>>>>>> >>>>>>>>>>>> > > in <module> >>>>>>>>>>>> > > 26. from sx.pisa3.pisa import * >>>>>>>>>>>> > > >>>>>>>>>>>> > > Exception Type: SyntaxError at /shop/invoice/1/ >>>>>>>>>>>> > > Exception Value: invalid syntax (__init__.py, line 43) >>>>>>>>>>>> > > >>>>>>>>>>>> > > -- >>>>>>>>>>>> > > You received this message because you are subscribed >>>>>>>>>>>> to the Google >>>>>>>>>>>> > > Groups "Mezzanine Users" group. >>>>>>>>>>>> > > To unsubscribe from this group and stop receiving >>>>>>>>>>>> emails from it, >>>>>>>>>>>> > send >>>>>>>>>>>> > > an email to >>>>>>>>>>>> > [email protected]<javascript:>. >>>>>>>>>>>> > > For more options, visit https://groups.google.com/grou >>>>>>>>>>>> ps/opt_out >>>>>>>>>>>> > <https://groups.google.com/groups/opt_out>. >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > -- >>>>>>>>>>>> > Email: [email protected] <javascript:> >>>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Email: [email protected] >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> [email protected] >>>>>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "Mezzanine Users" group. >>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to [email protected]. >>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Stephen McDonald >>>>>>>> http://jupo.org >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Mezzanine Users" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> [email protected] >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Mezzanine Users" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to [email protected]. >>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Stephen McDonald >>>>>> http://jupo.org >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Mezzanine Users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> [email protected] >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Mezzanine Users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> >>>> >>>> -- >>>> Stephen McDonald >>>> http://jupo.org >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Mezzanine Users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> >>> >>> -- >>> [email protected] >>> >> -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
