Note that there are some explanatory texts on larger screens.

plurals
  1. POZEO ZODB database - run locally not working
    primarykey
    data
    text
    <p>I tried looking at the <a href="http://www.zodb.org/en/latest/documentation/guide/zeo.html" rel="nofollow">documentation</a> for running ZEO on a ZODB database, but it isn't working how they say it should. I can get a regular ZODB running fine, but I would like to make the database accessible by several processes for a program, so I am trying to get ZEO to work.</p> <p>I created this script in a folder with a subfolder zeo, which will hold the "database.fs" files created by the <code>make_server</code> function in a different parallel process:</p> <p><strong>CODE:</strong></p> <pre><code>from ZEO import ClientStorage import ZODB import ZODB.config import os, time, site, subprocess, multiprocessing # make the server in for the database in a separate process with windows command def make_server(): runzeo_path = site.getsitepackages()[0] + "\Lib\site-packages\zeo-4.0.0-py2.7.egg\ZEO\\runzeo.py" filestorage_path = os.getcwd() + '\zeo\database.fs' subprocess.call(["python", runzeo_path, "-a", "127.0.0.1:9100", "-f" , filestorage_path]) if __name__ == "__main__": server_process = multiprocessing.Process(target = make_server) server_process.start() time.sleep(5) storage = ClientStorage.ClientStorage(('localhost', 9100), wait=False) db = ZODB.DB(storage) connection = db.open() root = connection.root() </code></pre> <p>the program will just block at the <code>ClientStorage</code> line if the <code>wait=False</code> is not given.</p> <p>If the <code>wait=False</code> is given it produces this error:</p> <p><strong>Error Message:</strong></p> <pre><code>Traceback (most recent call last): File "C:\Users\cbrown\Google Drive\EclipseWorkspace\NewSpectro - v1\20131202\2 - database\zeo.py", line 17, in &lt;module&gt; db = ZODB.DB(storage) File "C:\Python27\lib\site-packages\zodb-4.0.0-py2.7.egg\ZODB\DB.py", line 443, in __init__ temp_storage.load(z64, '') File "C:\Python27\lib\site-packages\zeo-4.0.0-py2.7.egg\ZEO\ClientStorage.py", line 841, in load data, tid = self._server.loadEx(oid) File "C:\Python27\lib\site-packages\zeo-4.0.0-py2.7.egg\ZEO\ClientStorage.py", line 88, in __getattr__ raise ClientDisconnected() ClientDisconnected </code></pre> <p><strong>Here is the output from the cmd prompt for my process which runs a server:</strong></p> <pre><code>------ 2013-12-06T21:07:27 INFO ZEO.runzeo (7460) opening storage '1' using FileStorage ------ 2013-12-06T21:07:27 WARNING ZODB.FileStorage Ignoring index for C:\Users\cab0008 \Google Drive\EclipseWorkspace\NewSpectro - v1\20131202\2 - database\zeo\databas e.fs ------ 2013-12-06T21:07:27 INFO ZEO.StorageServer StorageServer created RW with storage s: 1:RW:C:\Users\cab0008\Google Drive\EclipseWorkspace\NewSpectro - v1\20131202\ 2 - database\zeo\database.fs ------ 2013-12-06T21:07:27 INFO ZEO.zrpc (7460) listening on ('127.0.0.1', 9100) </code></pre> <p>What could I be doing wrong? I just want this to work locally right now so there shouldn't be any need for fancy web stuff.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload