[Grok-dev] ./bin/paster serve blobfile error

DIVINE, PAUL (PAUL) paul.divine at alcatel-lucent.com
Wed Feb 23 07:27:58 EST 2011


Thanks for the reply.

I use BlobFile like the following lines

class IDncc(interface.Interface):
    csl_name      = BlobFile(title=u'CSL file name' , required=False)


class Dncc(grok.Container):
    """       """
    grok.implements(IDncc)
    self.csl_name    = u''


    def read_uploaded_files(self):

        self.csl_data = self.read_uploaded_file(self.csl_name, self.csl_url,
                                                self.csl_content)


    def read_uploaded_file(self, f_name, f_url, f_content):
        """ """ 
        f_content_result = u''
        if f_name:
            f_content_result = f_name.data        
        elif f_url:
            sock = urllib.urlopen(f_url)
            if sock:
                htmlsource = sock.read()
                sock.close()
                f_content_result = htmlsource
            else:
                f_content_result = 'Adresse inconnue'         
        elif f_content:
            f_content_result = f_content        
        return f_content_result

regards

I use 
Python 2.5.2 (r252:60911, Jan 24 2010, 17:44:40)
[GCC 4.3.2] on linux2

Linux xxx 2.6.26-2-amd64 #1 SMP Thu Sep 16 15:56:38 UTC 2010 x86_64 GNU/Linux

Grok 1.4.3

Paul


-----Message d'origine-----
De : grok-dev-bounces at zope.org [mailto:grok-dev-bounces at zope.org] De la part de Jan-Wijbrand Kolman
Envoyé : mercredi 23 février 2011 12:38
À : grok-dev at zope.org
Objet : Re: [Grok-dev] ./bin/paster serve blobfile error

On 2/21/11 16:36 PM, DIVINE, PAUL (PAUL) wrote:
> Hi grokkers,
>
> I just installedGrok version 1.3 I. Great.
>
> Then I try to rebuild my application with the new version, but after the
> command
>
> ./bin/paster serve parts/etc/debug.ini
>
> the following error message is displayed.
snip
> ZopeXMLConfigurationError: File
> "/root/.buildout/eggs/z3c.blobfile-0.1.0-py2.5.egg/z3c/blobfile/browser/configure.zcml",
> line 8.2
>
> ConfigurationError: ('Unknown directive',
> u'http://namespaces.zope.org/browser', u'form')
>
> (virtual_env_05)pl6320:/home/npo/virtual_env_05/npotools#
>
> I add 'megrok.form', in the setup.file as described in the following lines.

Quick question: do your applications rely on the (ZMI)-views that are 
defined in z3c.blobfile.browser's configure.zcml?

regards, jw

_______________________________________________
Grok-dev mailing list
Grok-dev at zope.org
https://mail.zope.org/mailman/listinfo/grok-dev


More information about the Grok-dev mailing list