Ruslan Magana Vsevolodovna commited on
Commit
0922efd
1 Parent(s): 37295a9

os issues testing

Browse files

We have found the issue sqlite3.OperationalError: no such table: queue
I assume is due to I have used os.chdir

Files changed (2) hide show
  1. .gitignore +1 -0
  2. app.py +7 -7
.gitignore CHANGED
@@ -2,3 +2,4 @@
2
  *.mp4
3
  *.pyc
4
  *.wav
 
 
2
  *.mp4
3
  *.pyc
4
  *.wav
5
+ *.mp3
app.py CHANGED
@@ -135,16 +135,16 @@ def video_to_translate(url,initial_language,final_language):
135
  # Initial directory
136
  home_dir= os.getenv('home_dir')
137
  temp_dir = os.getenv('temp_dir')
138
- os.chdir(home_dir)
139
  print('Initial directory:',home_dir)
140
  cleanup()
141
  # Temporal directory
142
  print('Temporal directory:',temp_dir)
143
  # Go to temp directory
144
- os.chdir(temp_dir)
145
- print('Changing temporal directory',os.getcwd())
146
  # Cleaning previous files
147
- cleanup()
148
  file_obj=download_video(url)
149
  print(file_obj)
150
  # Insert Local Video File Path
@@ -180,7 +180,7 @@ def video_to_translate(url,initial_language,final_language):
180
  print("This video cannot be recognized")
181
  cleanup()
182
  # Return back to main directory
183
- os.chdir(home_dir)
184
  return "./demo/tryagain.mp4"
185
  text=text+text_chunk+" "
186
  text=str(text)
@@ -193,7 +193,7 @@ def video_to_translate(url,initial_language,final_language):
193
  print("This video cannot be recognized")
194
  cleanup()
195
  # Return back to main directory
196
- os.chdir(home_dir)
197
  return "./demo/tryagain.mp4"
198
 
199
  #print(text)
@@ -209,7 +209,7 @@ def video_to_translate(url,initial_language,final_language):
209
  print("This text cannot be translated")
210
  cleanup()
211
  # Return back to main directory
212
- os.chdir(home_dir)
213
  return "./demo/tryagain.mp4"
214
 
215
  #translation.text
 
135
  # Initial directory
136
  home_dir= os.getenv('home_dir')
137
  temp_dir = os.getenv('temp_dir')
138
+ #os.chdir(home_dir)
139
  print('Initial directory:',home_dir)
140
  cleanup()
141
  # Temporal directory
142
  print('Temporal directory:',temp_dir)
143
  # Go to temp directory
144
+ #os.chdir(temp_dir)
145
+ #print('Changing temporal directory',os.getcwd())
146
  # Cleaning previous files
147
+ #cleanup()
148
  file_obj=download_video(url)
149
  print(file_obj)
150
  # Insert Local Video File Path
 
180
  print("This video cannot be recognized")
181
  cleanup()
182
  # Return back to main directory
183
+ #os.chdir(home_dir)
184
  return "./demo/tryagain.mp4"
185
  text=text+text_chunk+" "
186
  text=str(text)
 
193
  print("This video cannot be recognized")
194
  cleanup()
195
  # Return back to main directory
196
+ #os.chdir(home_dir)
197
  return "./demo/tryagain.mp4"
198
 
199
  #print(text)
 
209
  print("This text cannot be translated")
210
  cleanup()
211
  # Return back to main directory
212
+ #os.chdir(home_dir)
213
  return "./demo/tryagain.mp4"
214
 
215
  #translation.text