Hi,
I have some lists in one blueprint of my Flask project which I wish to import into another blueprint. When I create the lists and print them in the first blueprint (input_blueprint.py) it shows the following in the server log.
2021-03-17 15:20:13 INPUT_BLUEPRINT======INPUT TYPE========== ['image']
2021-03-17 15:20:13 INPUT_BLUEPRINT======INPUT title========== ['Exam']
2021-03-17 15:20:13 INPUT_BLUEPRINT======INPUT files========== [<FileStorage: 'Screenshot 2021-02-10 at 17.39.00.png' ('image/png')>]
However, when I import them from input_blueprint.py and print them in file_processing_blueprint.py, the list is empty (leading to 'IndexError: list index out of range' when I try to unpack an item from the list to use it). Server log:
2021-03-17 15:20:14 input title []
2021-03-17 15:20:14 files []
2021-03-17 15:20:14 INPUT_TYPE []
When I run the flask project locally everything works fine, but when I run it on Pythonanywhere the above occurs.