Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Issue with import Flask in app.py #3

Open
kwiatks opened this issue Aug 7, 2021 · 1 comment
Open

Issue with import Flask in app.py #3

kwiatks opened this issue Aug 7, 2021 · 1 comment

Comments

@kwiatks
Copy link

kwiatks commented Aug 7, 2021

convert-video-to-audio git:(master) ✗ docker --version
Docker version 20.10.7, build f0df350
git clone https://github.com/IBM/convert-video-to-audio

cd convert-video-to-audio

docker image build -t convert-video-to-audio .
(build ran successfully)

➜ convert-video-to-audio git:(master) ✗ docker run -p 8080:8080 convert-video-to-audio
Traceback (most recent call last):
File "app.py", line 1, in
from flask import Flask, render_template, request, redirect, jsonify
File "/usr/local/lib/python3.5/dist-packages/flask/init.py", line 14, in
from jinja2 import escape
File "/usr/local/lib/python3.5/dist-packages/jinja2/init.py", line 5, in
from .bccache import BytecodeCache as BytecodeCache
File "/usr/local/lib/python3.5/dist-packages/jinja2/bccache.py", line 61
self.code: t.Optional[CodeType] = None
^
SyntaxError: invalid syntax

@kwiatks
Copy link
Author

kwiatks commented Aug 8, 2021

Took out all versions from requirements.txt

Flask
Flask-Cors
werkzeug
ibm-cos-sdk
ffmpeg-python

Change one line in app.py
from werkzeug.utils import secure_filename

Then app worked as required and could successfully start the app and complete uploads and extract audio from video and do Step 3 -> Play the Audio file(s) from Cloud Object Storage

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

No branches or pull requests

1 participant