Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#25 — Cannot upload more than one image at a time #14

Open
jeb6 opened this issue Aug 1, 2012 · 8 comments
Open

#25 — Cannot upload more than one image at a time #14

jeb6 opened this issue Aug 1, 2012 · 8 comments

Comments

@jeb6
Copy link

jeb6 commented Aug 1, 2012

Moved from Plone Issue Tracker

Plone Quick Upload 1.3.1
Cannot upload more than one image at a time without getting this error. Logged in as a Manager.

Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 91, in call
Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
Module Shared.DC.Scripts.Bindings, line 322, in call
Module Products.PloneHotfix20110531, line 106, in _patched_bindAndExec
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 240, in _exec
Module Products.CMFCore.FSPageTemplate, line 180, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 113, in pt_render
Module zope.tal.talinterpreter, line 271, in call
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
Module zope.tales.tales, line 696, in evaluate

  • URL: file:c:\plone4\eggs\products.cmfplone-4.1.4-py2.6.egg\Products\CMFPlone\skins\plone_content\author.cpt
  • Line 27, Column 4
  • Expression: <PythonExpr (not isAnon or allowAnonymousViewAbout) or here.raiseUnauthorized()>
  • Names:
    {'container': <PloneSite at /Plone>,
    'context': <PloneSite at /Plone>,
    'default': <object object at 0x00E41830>,
    'here': <PloneSite at /Plone>,
    'loop': {},
    'nothing': None,
    'options': {'args': (),
    'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x15915170>},
    'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x0E7AB600>,
    'request': <HTTPRequest, URL=https://www.ed.psu.edu/educ/author>,
    'root': ,
    'template': <FSControllerPageTemplate at /Plone/author>,
    'traverse_subpath': ['cgw2'],
    'user': <SpecialUser 'Anonymous User'>}
    Module Products.PageTemplates.ZRPythonExpr, line 48, in call
  • traceback_info: (not isAnon or allowAnonymousViewAbout) or here.raiseUnauthorized()
    Module PythonExpr, line 1, in
    Module Products.CMFCore.FSPythonScript, line 130, in call
    Module Shared.DC.Scripts.Bindings, line 322, in call
    Module Products.PloneHotfix20110531, line 106, in _patched_bindAndExec
    Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
    Module Products.PythonScripts.PythonScript, line 344, in _exec
    Module script, line 2, in raiseUnauthorized
  • <FSPythonScript at /Plone/raiseUnauthorized>
  • Line 2
    Unauthorized: Unauthorized()

Version Overview

Plone 4.1.4 (4113)

CMF 2.2.5

Zope 2.13.12

Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]

PIL 1.1.7-enfold2

Added by Thomas Desvenain on Jul 29, 2012 09:13 PM

looks like it tries to display an author page whereas it is forbidden to anonymous... but why does it try so ? it's hard to say.

may you upgrade plone and collective.quickupload to last version (4.1.6 and 1.5.4)
you should also remove hotfix, which is included in last zope version

then, if it doesn't fix the problem, give me the new traceback

bests.

thomas

PS : do you use flash upload or js-only quick upload ?

PPS : please now use github issue tracker
Added by Joe Bigler on Jul 30, 2012 02:02 AM
Thomas. Thanks for the quick response. Will try that in a few days. Am in a conference and will be a while before I can try that.

It was the js-only quick upload.

I will use that tracker. Can I move this to the github issue tracker?

Joe Bigler
Added by Thomas Desvenain on Jul 30, 2012 06:20 AM
Ok, just copy/paste this discussion ;)

See you

Thomas

@jeb6
Copy link
Author

jeb6 commented Aug 1, 2012

I tried testing this on my development site, which is Plone 4.1.6. I wasn't able to upgrade to collective.quickupload==1.5.4 It is currently at 1.5.3. I set this in eggs and pinned it in version.cfg.

Here is the message in buildout

Getting distribution for 'collective.quickupload==1.5.4'.
Error: Couldn't find a distribution for 'collective.quickupload==1.5.4'.

Here is the traceback

Traceback (innermost last):
Module ZPublisher.Publish, line 134, in publish
Module Zope2.App.startup, line 301, in commit
Module transaction._manager, line 89, in commit
Module transaction._transaction, line 321, in commit
Module transaction._transaction, line 209, in _prior_operation_failed
TransactionFailedError: An operation previously failed, with traceback:

File "c:\program files\plone\buildout-cache\eggs\zope2-2.13.15-py2.6.egg\ZServer\PubCore\ZServerPublisher.py", line 31, in init
response=b)
File "c:\program files\plone\buildout-cache\eggs\zope2-2.13.15-py2.6.egg\ZPublisher\Publish.py", line 443, in publish_module
environ, debug, request, response)
File "c:\program files\plone\buildout-cache\eggs\zope2-2.13.15-py2.6.egg\ZPublisher\Publish.py", line 237, in publish_module_standard
response = publish(request, module_name, after_list, debug=debug)
File "c:\program files\plone\buildout-cache\eggs\zope2-2.13.15-py2.6.egg\ZPublisher\Publish.py", line 126, in publish
request, bind=1)
File "c:\program files\plone\buildout-cache\eggs\zope2-2.13.15-py2.6.egg\ZPublisher\mapply.py", line 77, in mapply
if debug is not None: return debug(object,args,context)
File "c:\program files\plone\buildout-cache\eggs\zope2-2.13.15-py2.6.egg\ZPublisher\Publish.py", line 46, in call_object
result=apply(object,args) # Type s to step into published object.
File "c:\program files\plone\buildout-cache\eggs\collective.quickupload-1.5.3-py2.6.egg\collective\quickupload\browser\quick_upload.py", line 656, in quick_upload_file
f = factory(file_name, title, description, content_type, file_data, portal_type)
File "c:\program files\plone\buildout-cache\eggs\collective.quickupload-1.5.3-py2.6.egg\collective\quickupload\browser\uploadcapable.py", line 112, in call
transaction.commit()
File "c:\program files\plone\buildout-cache\eggs\transaction-1.1.1-py2.6.egg\transaction_manager.py", line 89, in commit
return self.get().commit()
File "c:\program files\plone\buildout-cache\eggs\transaction-1.1.1-py2.6.egg\transaction_transaction.py", line 336, in commit
t, v, tb = self._saveAndGetCommitishError()
File "c:\program files\plone\buildout-cache\eggs\transaction-1.1.1-py2.6.egg\transaction_transaction.py", line 329, in commit
self._commitResources()
File "c:\program files\plone\buildout-cache\eggs\transaction-1.1.1-py2.6.egg\transaction_transaction.py", line 446, in _commitResources
rm.tpc_vote(self)
File "c:\program files\plone\buildout-cache\eggs\zodb3-3.10.5-py2.6-win32.egg\ZODB\Connection.py", line 781, in tpc_vote
s = vote(transaction)
File "c:\program files\plone\buildout-cache\eggs\zodb3-3.10.5-py2.6-win32.egg\ZEO\ClientStorage.py", line 1098, in tpc_vote
return self._check_serials()
File "c:\program files\plone\buildout-cache\eggs\zodb3-3.10.5-py2.6-win32.egg\ZEO\ClientStorage.py", line 929, in _check_serials
raise s
ConflictError: database conflict error (oid 0x4c0bd8, class persistent.list.PersistentList, serial this txn started with 0x03983d06d346dc55 2012-08-01 01:42:49.518000, serial currently committed 0x03983d3992e03011 2012-08-01 02:33:34.424000)

I tried uploading 5 small images. It uploaded 2. I hope this helped. If there is anything else I can give you or try. please let me know. This is used primarily by our multimedia graphics person. This would be a big help as he uploads a lot of files.

Joe Bigler

@tdesvenain
Copy link
Member

Hi,
You have a write conflict error. Your instance couldn't resolve conflict resulting of adding many images at same time. This can happen sometimes. If it often happens, this can be caused by your specific code (not collective.quickupload)
Do you have a specific policy to generate your object ids ?
Are there rules that writes any other data on your ZODB when you add content ?
Do your images have similar file names ?

@jeb6
Copy link
Author

jeb6 commented Jan 25, 2013

It happens every time we try multiple files.
Do you have a specific policy to generate your object ids ? No.
Are there rules that writes any other data on your ZODB when you add content ? No
Do your images have similar file names ? I don't think so but will check to be sure

@jeb6
Copy link
Author

jeb6 commented Jan 25, 2013

I tried 5 different .jpg files with completely different names. I filled in the Title and the Description. It still fails.

@jeb6 jeb6 closed this as completed Jan 25, 2013
@jeb6 jeb6 reopened this Jan 25, 2013
@Solgema
Copy link

Solgema commented Apr 24, 2013

I have the same issue here.
Running ZEO with 4 clients and beaker session manager.
Currently I don't see how to solve the problem.

@mvaled
Copy link

mvaled commented Dec 30, 2013

I'm having a similar problem when uploading several files at the same time. I'm still using Plone 4.0 and c.quickupload 1.5.3 (currently I'm doing a step-by-step upgrading up to Plone 4.3, but this will take time since I need to make sure the 127 GB of blobs don't get lost in the process).

The error I'm seeing (and it's probably natural) is ZODB conflict. I've configured quickupload to serialize the upload (only 1 file at a time) but then uploading (like my client use to do) 800 files takes a lot of time.

Does this issue is has a relation with this situation, or my specific situation has been already fixed?

@Stolas
Copy link

Stolas commented Oct 17, 2014

You need to set the Simultaneous uploads limit to 1, this way you won't create conflicts.

@htgoebel
Copy link

In my installation, this error occurs even if update-limit is set to 2 and the second file is still uploading. It happens when the first time file is finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants