Closed apdame closed 5 years ago
Unfortunately, the fix from #115 is not implemented.
But: to reload the memory tables, you need the command line executable; but that is just a wrapper around a script bundled with the basic install.
I just pushed a commit to a new branch called 'commandline' that basically just allows you to access the command line interface without a fully installed module by replace bookworm reload_memory
in commands with python bookwormDB/manager.py reload_memory
(and so forth). It needs to be run from the base directory of the project, with the commandline
git branch checked out.
Does that seem like it should work?
It should, though I think I might need to pre-define "client." Here's the traceback I get from trying to run the command:
Traceback (most recent call last):
File "manager.py", line 570, in
OK. Yeah, it's trying to find a mysql configuration file with passwords for the db and not turning one up.
Probably the code should just be trying to log in without credentials--this may be worth changing later.
Maybe it would work with a --database
argument to the reload command.
If not, try putting a file at either (or both) ~/.my.cnf
OR bookworm.cnf
in the directory you're working out of which has passwords in it: that should look something like this, although the values will be different.
[client]
database = federalist
password = password123
user = bschmidt
Unfortunately, it seems to not be finding either of the config files in the directory, and using the --database flag also raises the same error, unfortunately. I wonder if this approach is a dead end...
Hmm. This is tough to reproduce, and that time would be probably be better spent on the general issue.
If you just want to get memory tables reloaded on one installation, the barest way to do this is pull the code to update memory tables directly out of the database. When logged into your db in mysql, type:
SELECT memoryCode FROM masterTableTable;
That should yield a bunch of SQL code you can run there, or run SELECT memoryCode FROM masterTableTable INTO OUTFILE '/tmp/code.sql'
instead and you'll get a file at /tmp/code.sql that you can run whenever desired.
Yeah, agreed. I may fiddle with it when I get time, but otherwise I'm going to go ahead and close this issue. Thanks for following up on this (seeming) fools' errand!
So I'm trying to install bookworm on a shared server space using a virtualenv, but I keep hitting a permissions error when I get to the dbbindings.py file ([Errno 13] Permission denied: ‘/var/www/cgi-bin/dbbindings.py’). This issue appears to have been discussed in #115, but I couldn't tell if the workaround had been implemented.
If it hasn't been, is there a good suggestion for how to manually reset the memory tables? That's basically all I need the install for, but in reading the code I wasn't able to parse the exact reset process.