Hi,
I'm quite new to PythonAnywhere but loving it so far.
I have an app which opens a word document and interrogates it using the python libraries docx, docxshared and docx2python.
I ran pip install successfully in the bash Console for docx and docx2python libraries.
I am getting an error on the web page which seems to indicate that the docx library isn't importing. Here is my flaskapp.py code
from flask import Flask
from PythonME import main_prog
app = Flask(__name__)
app.config["DEBUG"] = True
@app.route('/', methods=["GET","POST"])
def adder_page():
result = main_prog()
return result
if __name__ == "__main__":
app.run(debug=True)
and my pythonME code is
from docx import *
from docx.shared import Pt
from docx2python import docx2python
def main_prog():
document = Document('/home/dracstorey/mysite/countries.docx')
len(document.paragraphs)
return "Well done!"
Any help pointing me in the right direction would be appreciated.