zope + matplotlib delaxes() error

Matthias Beyer <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
hallo zusammen,

mit Hilfer einer externen Methode rufe ich ein Python Script 
(http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_Zope) auf, 
welches mir via matplotlib ein Image generiert und zurückgibt. Das 
funktioniert solange wie nur EIN User die externe Methode aufruft.

Sobald ich gleichzeitig einen 2ten Browser starte und die Methoden 
parallel laufen, kommt es zu einer Fehlermeldung in der matplotlib 
Funktion figure.delaxes()

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.ExternalMethod.ExternalMethod, line 231, in __call__
   - __traceback_info__: ((<Folder at /matplot>,), {}, None)
  Module /opt/zope/uie/threadtest/instance/matplot/Extensions/upload.py, 
line 36, in do
  Module plot, line 10, in chart
  Module matplotlib.pyplot, line 333, in clf
  Module matplotlib.figure, line 700, in clf
  Module matplotlib.figure, line 526, in delaxes
ValueError: list.remove(x): x not in list


Jetzt habe ich angefangen rumzuexperimentieren und versucht die Funktion 
mittels Semaphore zu schützen: klappt aber nicht.


def chart(self): 
    pool_sema = BoundedSemaphore(value=1)
    pool_sema.acquire()
    clf()
    pool_sema.release()
    ...


Der Fehler bleibt der Gleiche.
Hat jemand einen Tipp für mich, was ich anders machen sollte, bzw. was 
ich falsch mache?

Danke und Grüße
Matthias



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.