I’m struggling building my python code into an exe. It does work, but at certain point in my code when it uses Pandas, which depends on Matplotlib but its not calling it a all (no plots), it just breaks telling me "AttributeError: module ‘matplotlib’ has no attribute ‘rcParams’" Matplotlib is not imported in all my ..
I have a problem. I want to delete row from mysql table. I don’t understand what is wrong. Application return error only production linux enviroment, on Windows everything is okay. def sql_execute(conn, sql, val): try: cursor = conn.cursor() cursor.execute(sql, val) conn.commit() except mysql.connector.Error as e: print("sql_insert: ", info.error_insert_info, e) def delete_type_for_id(conn, val): sql = "DELETE ..
I need help uploading a file directly from an HTML form to an API. I’ve seen this being done for remote URLs, but I don’t know how to do this for local files? I tried writing this, but its not working: uploadmedia = request.files[‘fileupload’] client = Client(‘thisismykey’) with open(uploadmedia, ‘rb’) as file: new_upload = client.uploads(‘<space-id>’).create(file) ..
I’m Doing the tutorial (https://www.youtube.com/watch?v=dam0GPOAvVI&t=2412s) it was working nicely since there was a problem I don’t what.When I run the main.py Traceback (most recent call last): File "c:UsersadminDocumentsFlaskmain.py", line 6, in <module> app.run(debug=True) AttributeError: ‘NoneType’ object has no attribute ‘run’ PS C:UsersadminDocumentsFlask> And the website isn’t comming This site can’t be reached 127.0.0.1 refused to ..
Currently building a Flask app and using wtforms to help with building a file upload field, but I would like users to have the option to view the (multiple) file names they have already uploaded, either add more files, or remove some files that might have been wrongly uploaded, before finally clicking submit and the ..
I want to serve a flask based web page on my already running PHP website. My web directory looks like below. index.php (So can be seen in mysite.com ) inside contact folder index.php (can be seen in mysite.com/contact/ ) inside about folder index.php (can be seen in mysite.com/about/ ) inside "mypost" folder index.php (can be ..
hi i’m new in flask and twilio, i’m try to send 2 images with 1 request but just appears the last image that i put in the array this is my code from flask import Flask, request from twilio.twiml.messaging_response import MessagingResponse from twilio.rest import Client from dotenv import load_dotenv import os load_dotenv() app = Flask(__name__) ..
I have been developing a website in Flask and recently have begun refactoring my routes to accommodate an API framework. However, I am having trouble passing JSON data from my API (which comes from calling Flask’s jsonify() on a dict within the API) into views using Flask’s render templates. For example without the API a ..
from flask import Flask, jsonify from flask import request from slotscal import results from flask_sqlalchemy import SQLAlchemy import time app = Flask(__name__) app.config[‘SQLALCHEMY_DATABASE_URI’]= ‘postgresql://postgres:[email protected]:5432/flask’ db=SQLAlchemy(app) Traceback (most recent call last): File "", line 1, in File "/home/hamza/.local/lib/python3.8/site-packages/flask_sqlalchemy/init.py", line 1094, in create_all self._execute_for_all_tables(app, bind, ‘create_all’) File "/home/hamza/.local/lib/python3.8/site-packages/flask_sqlalchemy/init.py", line 1086, in _execute_for_all_tables op(bind=self.get_engine(app, bind), **extra) File "/home/hamza/.local/lib/python3.8/site-packages/flask_sqlalchemy/init.py", ..
I want to split web page onto two parts. Static (top one) and scroll-able (bottom one). The problem is that solution I have creates a scroll-able box with fixed width and height. But I’ve seen an example of a page where bottom and right sections are limited by size of the browser screen and have ..