Hi Ken

> Betreff: [Zope3-Users] Attempting to use z3c.rml properly...
> Hi All,
> I've given up on using z3c.rml (or indeed reportab's open-source
> software) with Google's AppEngine as the restrictions they 
> were too constraining.
> Now, I just want to be able to run z3c.rml on my machine at 
> home to verify how it works. Once it works, I'll be able to 
> upload it to a regular web host with less restrictions.
> So, starting with a clean z3c.rml 0.8.1:
> Installing onto a XP Pro SP3 machine, Python 2.5 with 
> setuptools.  I did a 'python setup.py install' for 
> zope.event, zope.interface, zope.schema, and 
> zope.i18nmessageid first.  Everything except 
> zope.i18nmessageid went well.
> Then, I did the same for z3c.rml.  It pulled in all the 
> dependancies (downloaded lxml 2.2, and checked zope.schema 
> 3.5.5, zope.interface 3.5.2, reportlab 2.3, pyPdf 1.12).

I'm not really sure how your setup looks like. But we use
z3c.rml very sucessfull for the project Stephan wrote
the library for. 

But we still use reportlab 2.1 withthe newest z3c.rml release.

> Okay, now what?  How best to launch this?
> If I cd into C:\Temp\z3c.rml\src\z3c\rml, and give this command line:
> python rml2pdf.py tests\input\simple-layout.rml
> I get this error:
> Traceback (most recent call last):
>  File "rml2pdf.py", line 24, in <module>
>    from z3c.rml import document, interfaces  File 
> "c:\python25\lib\site-packages\z3c.rml-0.8.1dev-py2.5.egg\z3c\
> rml\document.py",
> line 26, in <module>
>    from z3c.rml import attr, directive, interfaces, occurence 
>  File 
> "c:\python25\lib\site-packages\z3c.rml-0.8.1dev-py2.5.egg\z3c\
> rml\attr.py",
> line 35, in <module>
>    from z3c.rml import interfaces
>  File
> "c:\python25\lib\site-packages\z3c.rml-0.8.1dev-py2.5.egg\z3c\
> rml\interfaces.py",
> line 138, in <module>
>    class IDeprecatedDirective(zope.interface.interfaces.IInterface):
> AttributeError: 'module' object has no attribute 'interfaces'

This looks like zope.interface isn't available in your sys path.

I think you need to review the c.buildout documentation and
try to setup a project. Probably take a look at zopeproject
I think available on PyPi.

I think it should be possible to write a script or use the
existing scripts in z3c.rml and use the z3c.recipe.dev:script
to generate a working starting point based on buildout for
running your PDF conversion script. At least buildout makes
sure that your packages are installed correct as working unit.

Also a good starting point is the READEM.txt file in 
the z3c.rml package. There are several tests which will
produce several PDF based on rml code.

> If I cd into the 'tests' directory, and try this:
> python text_rml.py
> I get almost the same traceback (just with 'text_rml.py' 
> replacing 'rml2pdf.py').
> Am I trying to run this correctly?  I'd put money on my doing 
> something ham-fisted here, but I can't see what it is.
> Just for context, it'd be hard to underestimate my experience 
> with Python.  I've only been at this a week or so, and 
> figuring out things as I go, so please don't worry about 
> hurting my feeling by going too simple!
> Thanks for any help.

No problem

Roger Ineichen

> -Ken
> _______________________________________________
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users

Zope3-users mailing list

Reply via email to