blakearchive / transcription-test

0 stars 1 forks source link

internal server error #2

Open ba001 opened 7 years ago

ba001 commented 7 years ago

@queryluke i updated the xsl and css for the transcription viewer, but i'm getting an internal server error when i try out some xml. the server can't seem to read xsl/transcription.xsl.

from the log:

wren@blake /logs/dtp> tail -f errors [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] reraise(exc_type, exc_value, tb) [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] File "/usr/lib/python2.6/site-packages/flask/app.py", line 1475, in full_dispatch_request [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] rv = self.dispatch_request() [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] File "/usr/lib/python2.6/site-packages/flask/app.py", line 1461, in dispatch_request [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] return self.view_functionsrule.endpoint [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] File "/htdocs/dtp/run.py", line 19, in index [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] xml = transform(xmlInput) [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] File "/htdocs/dtp/run.py", line 26, in transform [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] xslt_xml = etree.parse(open("xsl/transcription.xsl")) [Wed Feb 01 12:01:30 2017] [error] [client 152.2.86.24] IOError: [Errno 2] No such file or directory: 'xsl/transcription.xsl'

queryluke commented 7 years ago

I tried to debug this and the issue are deeper than a pathing problem. You can fix the pathing problem by changing run.py line 26 to:

xslt_xml = etree.parse(app.open_resource("xsl/transcription.xsl"))

I tried this on dev, but the XSLT transformation is timing out. Resulting in:

[Wed Feb 01 17:16:49 2017] [error] [client 152.23.152.73] Premature end of script headers: dtp-qa.wsgi, referer: http://dtp-qa.lib.unc.edu/

The offending line seems to be line 27, when etree parses the file. This only seems to be a problem on the server, so it might be a python26/27 issue. Either way, I'm not sure how much time I'll be able to devote to this over the next couple of weeks.

The semi-good news is that everything works locally. Do the people who need to use this application use macs?

ba001 commented 7 years ago

yeah, i think they all use macs.

bringing @joeafletch into this one

queryluke commented 7 years ago

@joeafletch, see if the instructions I've provided in the readme work for you

ericloy commented 7 years ago

We all use Macs up in Rochester FYI.

joeafletch commented 7 years ago

@queryluke I got "error: can't create or remove files in install directory" when I tried to follow the readme instructions. But I'm a novice when it comes to using terminal so there may be something I need to do that @ba001 can help me with.

ba001 commented 7 years ago

added 'sudo' to the instructions. should be good to go