Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

Error uploading file: An error occurred (InvalidArgument) when calling the PutObject operation: None

I have this create function using Boto within the Flask and it has been working for months perfectly, but suddenly it just stopped working, and I can't seem to figure out why. @posts_blueprint.route('/...
Graham Morby's user avatar
0 votes
0 answers
377 views

Is the boto module the only way to access config vars in Heroku apps?

I'm deploying a flask webapp on heroku and I've created a heroku config var to store an admin key. The heroku config var docs say to use the boto module to access the config var from within the .py ...
rmd_po's user avatar
  • 461
0 votes
1 answer
740 views

How to write parquet file to ECS in Flask python using boto or boto3

I have flask python rest api which is called by another flask rest api. the input for my api is one parquet file (FileStorage object) and ECS connection and bucket details. I want to save parquet file ...
Abhash786's user avatar
  • 903
0 votes
1 answer
5k views

Boto3 S3 NosuchKey error when downloading file

I am accessing the Project Gutenberg API and I wrote a Python program that creates a text file out of a randomly chosen book from the API. Since the txt file is different each time the document in ...
Jordan Brandes's user avatar
0 votes
1 answer
343 views

Boto3 shows ConnectionReset Error

I added a db.session.close() to every function that does a query. Looking up the error also showed me that others had this issue because of the lost connection to S3. Locally it works pretty well. ...
jz22's user avatar
  • 2,608
0 votes
1 answer
137 views

How to prevent an object's class from changing

I'm having trouble in a flask application with an object. The first time the function is run, it runs perfectly fine. The second time it is run, however, I get an error that 'str' object has no ...
Kevin Pasquarella's user avatar
0 votes
1 answer
764 views

Flask Jinja2 for loop

I have this python script below which list the instance id, state and type of AWS EC2 instances. This is working fine as you can see below. [root@localhost ec2]# cat ec2.py #!/usr/bin/env python ...
user3847894's user avatar
  • 1,054
0 votes
0 answers
264 views

How to config google cloud storage credential?

I have a web application in flask python. It is working fine with google cloud storage and it's using my .boto file which contains gs credentials. After deploying to google app engine, it lose the ...
Cheng Jaycee Jiang's user avatar
0 votes
1 answer
788 views

Download File from s3 using Boto via proxy server

I have a file to this address: http://s3.amazonaws.com/bucket-name/sdile_pr_2_1_1/pr/0/2/1/1/dile_0_2_1_1.nc in a s3 bucket, that i want to make accessible via a flask app. to do so i created a ...
darkpirate's user avatar
2 votes
3 answers
512 views

Dynamo Db JSONResponseError with boto under Flask

I have this module which connects to Dynamo, creates a session table, and puts an item in it: import boto.dynamodb2 from boto.dynamodb2.table import Table from boto.dynamodb2.fields import HashKey ...
mickzer's user avatar
  • 6,338
0 votes
1 answer
215 views

Boto Import Error when running on apache

I've got an AWS EC2 instance running a flask app through apache. I've installed boto via pip I've got a wsgi file set up and if my flask app is a simple hello world it works fine: #This works from ...
Jordan's user avatar
  • 1,614
1 vote
1 answer
2k views

setting up aws credential in flask

I have been thinking of this, is there anyway to put my credential into settings.py. My generator.py is as following import os import sys import collections import boto from boto.s3.key import Key ...
Nicholas Lu's user avatar
0 votes
1 answer
351 views

DynamoDB scan() ResultSet has no attribute keys

I'm querying two dynamo db tables using scan to get all the items inside, storing them in a list, and then returning them ( all this within a Flask app). Pretty simple, nothing fancy. The issue is ...
Andi's user avatar
  • 1
1 vote
1 answer
1k views

Amazon S3 File Uploading issue using "BOTO" in my flask application -Python

In my flask application, I am using a function to upload file to Amazon s3, using Boto. Its working fine most of the cases, but some times its uploading files as zero byte file with no extension. ...
anusha's user avatar
  • 2,125
4 votes
3 answers
1k views

How to upload a file to s3 from a file upload form after modifying it with PIL?

Here is the code stuff: app.config['DEBUG']= True if request.method == 'POST' and request.form['file_submit']: print request.form print request.files['image'] if request....
BigBoy1337's user avatar
  • 4,955
2 votes
6 answers
6k views

Verify that an uploaded file is a word document in Python

In my web app (Flask) I'm letting the user upload a word document. I check that the extension of the file is either .doc or .docx . However, I changed a .jpg file's extension to .docx and it passed ...
Kreutzer's user avatar
  • 338
0 votes
0 answers
2k views

boto S3 & flask error - Authorization header is invalid -- one and only one ' ' (space) required

I have some code that was working just fine yesterday - now I'm getting an error. s3 = get_s3_connection() b_temp = s3.get_bucket(current_app.config['AWS_S3_BUCKET_TEMP']) b_assets = s3.get_bucket(...
fansonly's user avatar
  • 1,200
1 vote
1 answer
787 views

boto connection works locally and in heroku python shell but fails in webapp

I'm not sure how to diagnose this further. Heroku's evns are configured properly. Everything worked on my local machine line a charm. In production i get a internal server error when i try to use this ...
Drew Verlee's user avatar
  • 1,900
3 votes
1 answer
2k views

uWSGI+Flask+boto - thread safety

Say I have a Flask application, served by uWSGI using multiple processes, like: uwsgi --socket 127.0.0.1:3031 --file flaskapp.py --callable app --processes 4 And my Flask app is organized like this: ...
Caleb Wright's user avatar
11 votes
1 answer
5k views

Boto connect_xxx method and connection pools

If I call boto.connect_xxx, where xxx is some service (dynamodb, s3, etc) multiple times, does it create a new connection pool each time? What I'd like to do is something like this (example in Flask): ...
Caleb Wright's user avatar
0 votes
1 answer
2k views

Import Flask from local library

I'd like to have all my libraries, flask and boto, stored locally within the project instead of installed globally. I'm having some trouble getting this to work. My file structure is as follows: ...
ensnare's user avatar
  • 41.9k