Datagrid: JSONDecodeError: Invalid control character #535

Closed
mno1 opened this Issue Mar 7, 2014 · 5 comments

Comments

Projects
None yet
2 participants

mno1 commented Mar 7, 2014

Step to reproduce:

  1. Form with Datagrid field.
  2. Text field in the associated form.
  3. Fill the associated form with the string containing Polish letter ł
  4. Save the form
  5. Edit the form
  6. Edit the row in the Datagrid with the letter ł
  7. Got the error message in the modal window:
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 237, in _exec
  Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
  Module Products.PageTemplates.PageTemplate, line 79, in pt_render
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module zope.pagetemplate.pagetemplate, line 240, in __call__
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 851, in do_condition
  Module Products.PageTemplates.Expressions, line 205, in evaluateBoolean
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/home/techmetria/workspace/plone-43-dev/buildout-cache/eggs/Products.CMFPlomino-1.18.5-py2.7.egg/Products/CMFPlomino/skins/cmfplomino_templates/OpenBareForm.pt
   - Line 38, Column 4
   - Expression: <PythonExpr here.getForm().hasGoogleVisualizationField()>
   - Names:
      {'container': <PlominoForm at /Plone/plomino-test/testFormTable used for /Plone/plomino-test/plomino_documents>,
       'context': <PlominoForm at /Plone/plomino-test/testFormTable used for /Plone/plomino-test/plomino_documents>,
       'default': <object object at 0xb7558800>,
       'here': <PlominoForm at /Plone/plomino-test/testFormTable used for /Plone/plomino-test/plomino_documents>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xc897414>,
       'request': <HTTPRequest, URL=http://localhost:8080/Plone/plomino-test/plomino_documents/testFormTable/OpenBareForm>,
       'root': <Application at >,
       'template': <FSPageTemplate at /Plone/plomino-test/testFormTable/OpenBareForm>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>}
  Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
   - __traceback_info__: here.getForm().hasGoogleVisualizationField()
  Module PythonExpr, line 1, in <expression>
  Module Products.CMFPlomino.PlominoForm, line 1108, in hasGoogleVisualizationField
  Module Products.CMFPlomino.PlominoForm, line 1094, in _has_fieldtypes
  Module Products.CMFPlomino.PlominoDocument, line 1009, in getTemporaryDocument
  Module Products.CMFPlomino.PlominoDocument, line 1029, in __init__
  Module Products.CMFPlomino.PlominoUtils, line 506, in getDatagridRowdata
  Module jsonutil.jsonutil, line 403, in loads
  Module simplejson.decoder, line 402, in decode
  Module simplejson.decoder, line 418, in raw_decode
JSONDecodeError: Invalid control character at: line 1 column 5 (char 5)
Owner

ebrehault commented Mar 10, 2014

I do not reproduce with the current master version.
Which version do you use ?

mno1 commented Mar 10, 2014

Packages version:

Name Version
AccessControl 3.0.8
Acquisition 2.13.8
archetypes.querywidget 1.0.9
archetypes.referencebrowserwidget 2.4.19
archetypes.schemaextender 2.1.2
borg.localrole 3.0.2
collective.codemirror 0.2
collective.js.bootstrap 2.3.1.1
collective.js.datatables 2.0.1
collective.js.jqueryui 1.10.1.2
collective.monkeypatcher 1.0.1
collective.project 1.0.3
collective.z3cform.datagridfield 0.15
collective.z3cform.datagridfield-demo 0.5
collective.z3cform.datetimewidget 1.2.5
DateTime 3.0.3
diazo 1.0.4
distribute 0.6.28
DocumentTemplate 2.13.2
docutils 0.9.1
experimental.cssselect 0.3
ExtensionClass 2.13.2
feedparser 5.0.1
five.customerize 1.1
five.formlib 1.0.4
five.globalrequest 1.0
five.grok 1.3.2
five.intid 1.0.3
five.localsitemanager 2.0.5
grokcore.annotation 1.3
grokcore.component 2.5
grokcore.security 1.6.2
grokcore.site 1.6.1
grokcore.view 2.8
grokcore.viewlet 1.11
initgroups 2.13.0
jsonutil 1.0.3
lxml 2.3.6
mailinglogger 3.7.0
Markdown 2.0.3
martian 0.14
mechanize 0.2.5
Missing 2.13.1
MultiMapping 2.13.0
Paste 1.7.5.1
Persistence 2.13.2
Pillow 1.7.8
plomino.tinymce 0.7.2
Plone 4.3.2
plone.alterego 1.0
plone.app.blob 1.5.8
plone.app.caching 1.1.6
plone.app.collection 1.0.11
plone.app.content 2.1.3
plone.app.contentlisting 1.0.5
plone.app.contentmenu 2.0.8
plone.app.contentrules 3.0.4
plone.app.controlpanel 2.3.7
plone.app.customerize 1.2.2
plone.app.debugtoolbar 1.0a3
plone.app.dexterity 2.0.9
plone.app.discussion 2.2.8
plone.app.folder 1.0.5
plone.app.form 2.2.3
plone.app.i18n 2.0.2
plone.app.imaging 1.0.9
plone.app.intid 1.0.2
plone.app.iterate 2.1.10
plone.app.jquery 1.7.2
plone.app.jquerytools 1.5.6
plone.app.layout 2.3.7
plone.app.linkintegrity 1.5.3
plone.app.locales 4.3.2
plone.app.openid 2.0.2
plone.app.portlets 2.4.5
plone.app.querystring 1.0.8
plone.app.redirector 1.2
plone.app.referenceablebehavior 0.5
plone.app.registry 1.2.3
plone.app.relationfield 1.2.1
plone.app.search 1.1.5
plone.app.textfield 1.2.2
plone.app.theming 1.1.1
plone.app.upgrade 1.3.4
plone.app.users 1.2a2
plone.app.uuid 1.0
plone.app.viewletmanager 2.0.4
plone.app.vocabularies 2.1.11
plone.app.workflow 2.1.6
plone.app.z3cform 0.7.4
plone.autoform 1.5
plone.batching 1.0
plone.behavior 1.0.2
plone.browserlayer 2.1.2
plone.cachepurging 1.0.4
plone.caching 1.0
plone.contentrules 2.0.3
plone.dexterity 2.1.3
plone.directives.dexterity 1.0.2
plone.directives.form 2.0
plone.fieldsets 2.0.2
plone.folder 1.0.4
plone.formwidget.autocomplete 1.2.5
plone.formwidget.contenttree 1.0.7
plone.formwidget.datetime 1.0
plone.formwidget.namedfile 1.0.7
plone.i18n 2.0.9
plone.indexer 1.0.2
plone.intelligenttext 2.0.2
plone.keyring 2.0.1
plone.locking 2.0.4
plone.memoize 1.1.1
plone.namedfile 2.0.2
plone.openid 2.0.1
plone.outputfilters 1.11.1
plone.portlet.collection 2.1.5
plone.portlet.static 2.0.2
plone.portlets 2.2
plone.protect 2.0.2
plone.recipe.zope2instance 4.2.13
plone.registry 1.0.1
plone.reload 2.0
plone.resource 1.0.2
plone.resourceeditor 1.0
plone.rfc822 1.1
plone.scale 1.3.2
plone.schemaeditor 1.3.3
plone.session 3.5.3
plone.stringinterp 1.0.10
plone.subrequest 1.6.7
plone.supermodel 1.2.3
plone.synchronize 1.0.1
plone.theme 2.1
plone.transformchain 1.0.3
plone.uuid 1.0.3
plone.z3cform 0.8.0
plonetheme.bootstrap 1.0
plonetheme.classic 1.3.2
plonetheme.sunburst 1.4.5
Products.Archetypes 1.9.4
Products.ATContentTypes 2.1.13
Products.ATReferenceBrowserWidget 3.0
Products.BTreeFolder2 2.13.3
Products.CMFActionIcons 2.1.3
Products.CMFCalendar 2.2.2
Products.CMFCore 2.2.7
Products.CMFDefault 2.2.3
Products.CMFDiffTool 2.1
Products.CMFDynamicViewFTI 4.0.5
Products.CMFEditions 2.2.8
Products.CMFFormController 3.0.3
Products.CMFPlacefulWorkflow 1.5.9
Products.CMFPlomino 1.18.5
Products.CMFPlone 4.3.2
Products.CMFQuickInstallerTool 3.0.6
Products.CMFUid 2.2.1
Products.contentmigration 2.1.5
Products.DCWorkflow 2.2.4
Products.DocFinderTab 1.0.5
Products.ExtendedPathIndex 3.1
Products.ExternalEditor 1.1.0
Products.ExternalMethod 2.13.0
Products.GenericSetup 1.7.4
Products.MailHost 2.13.1
Products.Marshall 2.1.2
Products.MIMETools 2.13.0
Products.MimetypesRegistry 2.0.5
Products.OFSP 2.13.2
Products.PasswordResetTool 2.0.15
Products.PlacelessTranslationService 2.0.4
Products.PloneLanguageTool 3.2.7
Products.PlonePAS 4.1.1
Products.PloneTestCase 0.9.17
Products.PluggableAuthService 1.10.0
Products.PluginRegistry 1.3
Products.PortalTransforms 2.1.2
Products.PythonScripts 2.13.2
Products.ResourceRegistries 2.2.9
Products.SecureMailHost 1.1.2
Products.StandardCacheManagers 2.13.0
Products.statusmessages 4.0
Products.TinyMCE 1.3.5
Products.validation 2.0
Products.ZCatalog 2.13.23
Products.ZCTextIndex 2.13.4
Products.ZopeVersionControl 1.1.3
Products.ZSQLMethods 2.13.4
Python 2.7.5
python-dateutil 1.5
python-gettext 1.2
python-openid 2.2.5
pytz 2013b
Record 2.13.0
repoze.xmliter 0.5
RestrictedPython 3.6.0
roman 1.4.0
simplejson 2.5.2
six 1.2.0
techmetria.kuba 1.0
tempstorage 2.12.2
transaction 1.1.1
Unidecode 0.04.1
unittest2 0.5.1
wicked 1.1.10
wsgiref 0.1.2
z3c.autoinclude 0.3.4
z3c.caching 2.0a1
z3c.form 3.0.2
z3c.formwidget.query 0.9
z3c.jbot 0.7.1
z3c.objpath 1.1
z3c.relationfield 0.6.2
z3c.zcmlhook 1.0b1
zc.buildout 1.7.1
zc.lockfile 1.0.2
zc.recipe.egg 1.3.2
zc.relation 1.0
ZConfig 2.9.1
zdaemon 2.0.7
zExceptions 2.13.0
zLOG 2.11.1
ZODB3 3.10.5
zope.annotation 3.5.0
zope.app.component 3.9.3
zope.app.container 3.9.2
zope.app.content 3.5.1
zope.app.form 4.0.2
zope.app.intid 3.7.1
zope.app.locales 3.6.2
zope.app.pagetemplate 3.11.2
zope.app.publication 3.12.0
zope.authentication 3.7.1
zope.broken 3.6.0
zope.browser 1.3
zope.browsermenu 3.9.1
zope.browserpage 3.12.2
zope.browserresource 3.10.3
zope.cachedescriptors 3.5.1
zope.component 3.9.5
zope.componentvocabulary 1.0.1
zope.configuration 3.7.4
zope.container 3.11.2
zope.contentprovider 3.7.2
zope.contenttype 3.5.5
zope.copy 3.5.0
zope.copypastemove 3.7.0
zope.datetime 3.4.1
zope.deferredimport 3.5.3
zope.deprecation 3.4.1
zope.dottedname 3.4.6
zope.dublincore 3.7.0
zope.error 3.7.4
zope.event 3.5.2
zope.exceptions 3.6.2
zope.filerepresentation 3.6.1
zope.formlib 4.0.6
zope.globalrequest 1.0
zope.hookable 3.4.1
zope.i18n 3.7.4
zope.i18nmessageid 3.5.3
zope.interface 3.6.7
zope.intid 3.7.2
zope.keyreference 3.6.4
zope.lifecycleevent 3.6.2
zope.location 3.9.1
zope.pagetemplate 3.6.3
zope.processlifetime 1.0
zope.proxy 3.6.1
zope.ptresource 3.9.0
zope.publisher 3.12.6
zope.ramcache 1.0
zope.schema 4.2.2
zope.security 3.7.4
zope.sendmail 3.7.5
zope.sequencesort 3.4.0
zope.site 3.9.2
zope.size 3.4.1
zope.structuredtext 3.5.1
zope.tal 3.5.2
zope.tales 3.5.3
zope.testbrowser 3.11.1
zope.testing 3.9.7
zope.traversing 3.13.2
zope.viewlet 3.7.2
Zope2 2.13.21
ZopeUndo 2.12.0

Uploading plomino_snapshot1.png . . .

Owner

ebrehault commented Mar 11, 2014

I tried your db and it works fine for me (here is a screenshot)
capture du 2014-03-11 14 44 26

so there must be something specific on your side...

mno1 commented Mar 12, 2014

Testing configuration is Kubuntu 12.04 Desktop, Plone 4.3.2 Unified
Installer and Plomino.
Did you try to edit row "Polish letter ł"?

2014-03-11 14:47 GMT+01:00 Eric BREHAULT notifications@github.com:

I tried your db and it works fine for me (here is a screenshot)
[image: capture du 2014-03-11 14 44 26]https://f.cloud.github.com/assets/460966/2385857/96463348-a923-11e3-9a84-0beb37289c4d.png

so there must be something specific on your side...

Reply to this email directly or view it on GitHubhttps://github.com/plomino/Plomino/issues/535#issuecomment-37296544
.

Informacja:

Pocztę sprawdzam o godzinie 12 i 16. W przypadku pilnych spraw proszę o
kontakt pod numerem telefonu +48 698 46 36 44.

W przypadku przesyłania mi e-mail z zawartością dokumentów zawierających
dane osobowe albo inne ważne dokumenty to proszę o zakodowanie tych
dokumentów. Przykładowo można skompresować dokumenty programem WinRAR z
hasłem. Jako to zrobić zostało opisane tutaj:
http://www.techmetria.pl/knowledge-base/wymiana-dokumentow

Inny sposób to utworzenie dokumentu PDF z hasłem. Hasło do odkodowania
proszę przesłać SMS-em na mój telefon. Jeżeli nie wiesz jak to zrobić to
proszę skontaktuj się ze mną przed wysłaniem poufnych dokumentów.

Owner

ebrehault commented Mar 12, 2014

oh ok, I was just creating new rows, but when I edit an existing one, I do get the error.
Sorry, I haven't been careful enough when reading your instructions.

I work on it.

@ebrehault ebrehault closed this in 7ff1bec Mar 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment