All Questions
1,460
questions
0
votes
1
answer
25
views
Flask "error": "415 Unsupported Media Type: Did not attempt to load JSON data because the request Content-Type was not 'application/json'."
I am building a backend for my react app using flask. Using an openai api to generate cover letters from submitted form data.
from flask import Flask, request, jsonify
from flask_cors import CORS
...
0
votes
0
answers
19
views
Unable to receive location and temperature using WEATHERAPI in Flask app
I'm trying to create an app to generate the weather at a certain location based on the IP address visiting my site. My function is supposed to get their IP address using ip-api.com and then send that ...
0
votes
1
answer
46
views
Translating words between the Czech Language and English
I've proceeded with my project in Flask further. I want to translate words from slovnik.seznam.cz and store the translated words in links one after the other. Now I'm almost done but I'm not getting ...
0
votes
0
answers
101
views
How to parse x-www-form-urlencoded POST requests with JSON body?
I'm new to Flask and trying to build a Flask app to receive POST requests coming from an API, then insert data into a database. The POST requests come as-is from a 3rd party program, I cannot modify ...
0
votes
1
answer
18
views
PYTHON / FLASK / JS error when sending Jsonified data - SyntaxError: Unexpected end of input
So, I have a flask server that sends me these variables:
responseAPI = {
"data": detection_data["Race"],
"gender": detection_data["Gender"],
...
0
votes
0
answers
25
views
Problems with flask and javascript
the idea is when you click in the button of an actuador , it will send a message to the microcontroller to activate or deactivate a switch. The thing is that when I click on the actuador to send the ...
0
votes
0
answers
35
views
Cant convert "application/x-www-form-urlencoded" to "application/json" JavaScript Flask
I'm trying to pull image from client(javascript) to sever(flask) but i got error while doing that. Even i tried to set 'Content-Type': 'application/json' but when i return the 'content_type' it gave ...
0
votes
0
answers
53
views
why js only displays the second element of json?
I want to display all elements of json. but it only displays the second element. please help.
A pkl file is:
[('[email protected]', [[('That', 'DT'), ('request', 'NN'), ('will', 'MD'), ('present', 'VB'), (...
0
votes
0
answers
104
views
Sigma.JS custom rendering
I'm trying to visualize the data coming through the API with Sigma.JS, but I can't always get results. When I tried to visualize the dynamic incoming data without mock data by writing a simple API ...
0
votes
1
answer
27
views
Frontend fetching data from unexpected localhost address despite proxy configuration
I have a React frontend application configured with a proxy in the package.json file pointing to my Flask backend running on http://localhost:2371. However, when making requests to fetch data from the ...
0
votes
0
answers
81
views
How to convert snort log to json file
i am still beginner and i have a project
i am building an Intrusion Detection system web application based on snort IDS open source version 2.9 and i am trying to display the output of snort in the ...
0
votes
1
answer
20
views
How to pass a json encoded variable from a python function to a in an html embetted js code in flask
I have this
@app.route('/sensor', methods=['GET', 'POST'])
def sensor():
output ='''<!DOCTYPE html><html lang="en"><head> <meta name="viewport" content=&...
0
votes
0
answers
34
views
insert new record dynamically depending on Table Name (postgres DB using SQLalchemy)
I would like to know how to write JSON object into tables which depends on the tableName.
I know how to write to table explictly (see below).
I don't know how to write it such a way that I can ...
1
vote
1
answer
59
views
How to pass JSON with newline \n from flask backend to Jinja2 and JQuery frontend? [closed]
I am trying to pass an array of dictionaries contain escape characters from my flask backend to Jinja2 with JS.
'[{"id": 3, "tags": "t2", "content": "B&...
0
votes
0
answers
36
views
I get the error "Unsupported Media Type Did not attempt to load JSON data(...)."
I am using python and flask, and I am trying to make a web application for making flashcards.
However, when I try to submit my flashcards (i.e., when I fill out the fields "course", "...