Plone documentation on Files and Images

Hi everyone,

I'm currently looking to try to incorporate a CSV upload form into my Plone Project and I've been using the Plone documentation on Files and Images referencing a "Simple CSV form". Upon following along this example I get the following error when trying to build:

  File "/local/home/myuser/test/zinstance/src/plone.addon/src/plone/addon/importcsv.py", line 12, in <module>
    class IImportCSVFormSchema(form.Schema):
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/local/home/myuser/test/zinstance/parts/instance/etc/site.zcml", line 16.2-16.23
    ZopeXMLConfigurationError: File "/local/home/myuser/test/buildout-cache/eggs/Products.ATContentTypes-2.3.8-py2.7.egg/Products/ATContentTypes/configure.zcml", line 18.2-18.44
    ZopeXMLConfigurationError: File "/local/home/myuser/test/buildout-cache/eggs/plone.app.collection-1.2.6-py2.7.egg/plone/app/collection/configure.zcml", line 9.2-9.45
    ZopeXMLConfigurationError: File "/local/home/myuser/test/buildout-cache/eggs/plone.app.querystring-1.4.8-py2.7.egg/plone/app/querystring/configure.zcml", line 11.2-11.42
    ZopeXMLConfigurationError: File "/local/home/myuser/test/buildout-cache/eggs/plone.app.registry-1.7.1-py2.7.egg/plone/app/registry/configure.zcml", line 12.4-12.34
    ZopeXMLConfigurationError: File "/local/home/myuser/test/buildout-cache/eggs/plone.app.registry-1.7.1-py2.7.egg/plone/app/registry/browser/configure.zcml", line 6.4-6.43
    ZopeXMLConfigurationError: File "/local/home/myuser/test/buildout-cache/eggs/plone.app.z3cform-3.0.4-py2.7.egg/plone/app/z3cform/configure.zcml", line 10.2-10.41
    ZopeXMLConfigurationError: File "/local/home/myuser/test/buildout-cache/eggs/plone.app.widgets-2.3-py2.7.egg/plone/app/widgets/configure.zcml", line 12.2-12.41
    ZopeXMLConfigurationError: File "/local/home/myuser/test/buildout-cache/eggs/Products.CMFPlone-5.1.2.1-py2.7.egg/Products/CMFPlone/configure.zcml", line 105.2-109.8
    ZopeXMLConfigurationError: File "/local/home/myuser/test/zinstance/src/plone.addon/src/plone/addon/configure.zcml", line 46.4-51.6
    AttributeError: 'module' object has no attribute 'Schema'

I interpret this as the from plone.autoform import form not containing .Schema but I might be wrong in this (still new to Plone). My question is wether this interpretation is correct and if so, where would i start looking for the error in my approach?

Kind regards, Tony

I use this Code for my Custom Forms

# -*- coding: utf-8 -*-
import z3c
from plone.supermodel import model
from plone.autoform.form import AutoExtensibleForm

class IMyFormSchema(model.Schema):
    # add your stuff

class MyForm(AutoExtensibleForm, z3c.form.form.Form):
    schema = IMyFormSchema
    # add your stuff

Thank you for your response Jan!

It did indeed work, as in I do not get the error prompt when using this approach.:slight_smile:

Kind regards, Tony