Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal server error #2

Open
ghost opened this issue Feb 1, 2017 · 6 comments
Open

internal server error #2

ghost opened this issue Feb 1, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Feb 1, 2017

@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
Copy link
Collaborator

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?

@ghost
Copy link
Author

ghost commented Feb 2, 2017

yeah, i think they all use macs.

bringing @joeafletch into this one

@queryluke
Copy link
Collaborator

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

@ericloy
Copy link

ericloy commented Feb 2, 2017

We all use Macs up in Rochester FYI.

@joeafletch
Copy link

@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.

@ghost
Copy link
Author

ghost commented Feb 2, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants