[Expo-tech] Django status update
Wookey
wookey at wookware.org
Sun Jun 23 02:29:24 BST 2019
Sorry - not much action due to lots of time going into sorting out
cavelink (pretty much done now). Hopefully being posted out on Monday.
Had a fiddle and found packages for python-django-tinymce and
python-django-imagekit the former didn't actually work and was only
python 3. Causing manage.py runserver to fail, complianing about no
tinymce to import. Have fixed that and will upstream.
Now manage.py runserver complains about missing something (font?):
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 127, in __init__
self.font = core.getfont(font, size, index, encoding)
IOError: cannot open resource
So we have a python 2.7 version of PIL but it's not initialising/working.
Comment there says "FreeType font wrapper (requires _imagingft service)".
I guess something is not installed, but I don't know what.
Looks like this (in troggle/core/views_caves.py) is failing:
for FONT in [
"/usr/share/fonts/truetype/freefont/FreeSans.ttf",
"/usr/X11R6/lib/X11/fonts/truetype/arial.ttf",
"C:\WINNT\Fonts\ARIAL.TTF"
]:
if os.path.isfile(FONT): break
TEXTSIZE = 16
CIRCLESIZE =8
LINEWIDTH = 2
myFont = ImageFont.truetype(FONT, TEXTSIZE)
Aha. You need to install fonts-freefont-ttf in order to have "/usr/share/fonts/truetype/freefont/FreeSans.ttf" present on filesystem. Obscure troggle dependency.
Now I get:
File "/home/expo/troggle/urls.py", line 23, in <module>
actualurlpatterns = patterns('',
NameError: name 'patterns' is not defined
. I guess this is a 'needs older django' error?
I also tried forward-porting the jessie-vintage python-django to
stretch so we had a 1.7 package to run without resorting to PIP.
It all builds, but eventually some tests fail with:
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
see log in /home/wookey/packages/python-django_1.7.11-1+deb8u5_amd64.build
I don't know what this means (and haven't had time to look very hard yet).
Is this a python3 thing?
Not clear whether it's worth persuing this (fixing issue, or building
without tests and hoping this one isn't important), or just
pip-instaling 1.7.11.
I've got another 10 hours roofing to do tomorrow before it rains, then
I'll get back to this. This email just in case anyone else gets enthused in the meantime.
I've not done the apache wsgi config yet, due to not getting the
simple runserver to work yet.
Hopefully I'll at least have the right stuff installed, and django
running, by the end of the weekend...
Wookey
--
Principal hats: Linaro, Debian, Wookware, ARM
http://wookware.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.wookware.org/pipermail/expo-tech/attachments/20190623/2022f11d/attachment.sig>
More information about the Expo-tech
mailing list