API serving up old responses in flask

I'm calling a Flask api, run by gunicorn and which is served out by nginx all on a linux box viretal env When I use curl or postman to test I get 1 of 4 responses randomly each time I run - but...

Flask Redis Queue (RQ) worker cannot import module named app

I've a flask application running called modeling-manager, it's receiving a post request from another flask application. 'till there everything works fine. (all files are located in the same...

Flask blueprint architecture issues

I'm new with using flask so I'm doing a lot of research to find out what the best way to structure my application. I've been following app factories and using blueprints, but I'm having trouble...

OSError: [Errno 22] Invalid argument ( Fails randomly while processing a file)

I run this python code which reads a file and uploads data to the engine. It runs fine, however out of a sudden it fails and throws the error in the middle. I did some research but wasn't able to...

Specify Beam Version for Dataflow Operator on Cloud Composer

We have written a Beam pipeline for version 2.11 but when we try to run it on Cloud Composer using the DataflowOperator it uses SDK version 2.5. Is there anywhere to specify that 2.11 should be...

missing /bin folder inside conda environment

I created a conda environment using following command: conda create -p D:\batch\tasks\shared\test-condaenv-users python=3.7 pip -y But noticed that when I activate the environment then try to pip...

localstack Kinesis does not start in docker

We're running Docker on Windows 10. We have a simple Java Springboot application, which should interact with AWS Kinesis and S3. For local testing, we want to pull the localstack Docker latest...

How to upload JSON data to Azure storage blob using Azure Blob storage bindings for Azure Functions in Python

I want to upload JSON data as a .json file to Azure storage blobs using Azure Functions in Python. Because I am using Azure Functions and not an actual server, I do not want to (and probably...

Connect Cloud Storage to Cloud Function

I'm having issues executing a Cloud Function on GCP which tries to update some google sheets of mine. I got this script working in Jupyter but have struggled to deploy it virtually as a Cloud...

I'm getting Value 'func.Out' is unsubscriptable trying to write in an azure blob storage using a python function

I want to write in an azure blob storage using Azure Functions in Python. I'm using the output blob storage bindings for Azure Functions. My function.json: { "scriptFile": "__init__.py", ...

AWS sagemaker-container: How to create or pass the resourceconfig.json to framework for training?

I am trying to create a custom model/image/container for Amazon Sagemaker. I had read all the basics tutorials, how to create an image with your requirements. Actually i have a properly set image...

Apache beam in Dataflow getting errors related to generator object is not subscriptable

I am trying to create my first pipleine in dataflow, I have the same code runnign when i execute using the interactive beam runner but on dataflow I get all sort of errors, which are not making...

Getting error while creating managed disk from a VHD file in a storage account in the same subscription with CLI

Facing issue while creating managed disk from a VHD file in a storage account in the same subscription with CLI. I have replicated/copied managed disk icremental snapshot from westus region to...

Timer Trigger in Azure function is not working when i do Code+test

I created a timer trigger in Azure function in my Visual Studio as below and deployed it in the Azure Portal. Once i try to do a Code+Test it is giving me Output as HTTP response code : 202...

Reading data from MySQL and writing in GCP Bucket using Apache Beam Python API

I'm trying to read data from MySQL database (located in GCP) and writing the same in GCP Bucket. I want to use Python SDK for the same. Below is the code I've written. from __future__ import...

AssertRaises fails even exception is raised when using "http.client" Python

I'm creating an API class for my project that uses the library http.Client. The issue is with unittesting, When I am trying to raise an error, and test it with assertRaises, the assertRaises fails...

ImageAI/Keras can't read ResNet model on Raspberry Pi but works on Windows

About I'm trying to load and use an ImageAI ResNet model and then access it via a Flask server. More details about the project are on my Github repository. My code runs well on Windows but not on...

Airflow/Composer - Python Module running all the time over and over

I was responsible for implementing Google Composer (same as airflow) in my team, and I think I did something fundamentally wrong: I have my DAGs that always call to a .python file where I have...

Python Google Cloud Function Missing Log Entries

I'm experimenting with GCP's cloud functions and python for the first time and wanted to get python's logging integrated sufficiently so that they fit well with GCP's logging infrastructure...

Django + Celery + Flower seems to break RabbitMQ broker

I've working on a fresh headless Debian server (Buster) with a still in dev setup of Django (3.1.6) + Celery (4.4.7) + RabbitMQ (3.7.8) + Flower (0.9.7). (I was running with Celery 5, but...

Docker (compose): connection refused without sudo

All was fine until "something". After that "something", I could use docker and docker-compose with sudo but without it the docker would hang indefinitely and the docker-compose would return...

Can't fix error "RuntimeError: You need to use the gevent-websocket server." and "OSError: write error"

I am writing a website for Flask. I use a bunch of uWSGI + NGINX + Flask-Socketio. I use gevent as an asynchronous module. Errors occur during operation: RuntimeError: You need to use the...

Apache Superset TypeError while starting with OAuth authentication enabled

I'm trying to configure OAuth authentication with GitHub apis, on Superset 1.0.1. Following the docs, I added the following lines in superset_config.py from flask_appbuilder.security.manager...

azure functions module errors using python

I'm new to azure so excuse my lack of knowledge about the platform. I'm currently trying to run and deploy an azure function using python. these modules are currently found in my requirements.txt...

NameError: name '_mysql' is not defined -- On airflow start in MacOSX

There are numbers of articles on the titled question but none of them worked for me. The detailed error is as follows: Traceback (most recent call last): File...

HuggingFace SciBert AutoModelForMaskedLM cannot be imported

I am trying to use the pretrained SciBERT model (https://huggingface.co/allenai/scibert_scivocab_uncased) from Huggingface to evaluate masked words in scientific/biomedical text for bias using...

Git merge conflict: Cannot find the problem

Some background story! I have been working with git to contribute to an open source package, and I am somewhat novice in this area. I know some basic stuff. Furthermore, I also read that if merge...

ModuleNotFound: dateutil.parser

Here's what I'm running into: (.venv) PS C:\Users\<redacted>\onedrive\dev\python\code\kb4> py kb4.py Traceback (most recent call last): File...

Flask SQLAlchemy and Blueprints

I am still learning flask and I have created an restful API with SQLAlchemy. The app is getting to be big and I would like to split it up into multiple files. When I separate the routes section...

Superset exporting and importing the Dashboards using CLI (for versioning control)

Goal: My goal is to export the all the dashboards from the superset so that I can save them as backup and also make sure that I can import them. Existing setup: I am cloning superset from git and...