» | 56 Anonymous 2018-06-09T15:37:29I tried getting the code up on Github to run locally, and these were the little issues I encountered along the way:
The BasePath variable is set not in the configuration file local_settings.py but in server.py and also independently in dbmigrate. This means if I want to put the files anywhere but /home/wwwrun/4taba/, I would have to edit the source code. I ended up adding a symlink for now, and it seems to be working. Is this variable needed at all? Can't it just be determined at runtime from __file__ or inspect.stack()?
The dbinit script seems to want to be run by nix-shell, but this is not listed in the requirements. It worked fine when run as `python3 dbinit`, though.
Early in getting it to work, I encountered this error:
File "[redacted]/server.py", line 47, in <module> PageHeader = f.read() File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] [/code] The issue is that the text encoding used by open() is locale-dependent, and Apache on my system is running in the C locale. I was able to fix this by adding [code]WSGIDaemonProcess 4taba lang='en_US.UTF-8' locale='en_US.UTF-8' WSGIProcessGroup 4taba
in the VirtualHost part of my config file, but it would probably be a good idea to specify the encoding here.
Other than that, things were fairly straightforward and easy to get working with a bit of trial and error. It might be helpful to fill in that "Apache Configuration" section in the README, but it wasn't hard to figure out what needed to be done.
|
|