From thomas.prebble at gmail.com Wed Jul 1 08:15:50 2020 From: thomas.prebble at gmail.com (Thomas Prebble) Date: Wed, 1 Jul 2020 21:15:50 +0900 Subject: [Flask] A minimal example to take upload of a file, call a command on the file, then return the output In-Reply-To: References: Message-ID: The example in quickstart will get you what you want for uploads. For the command execution subprocess is what you need: https://docs.python.org/3.7/library/subprocess.html Thomas On Wed, 1 Jul 2020, 00:03 Peng Yu, wrote: > I need a minimal flask example, showing how to take upload of a file, > call a command on the file, then return the output. > > The suppose the command is called mycmd.sh. It is called in the following > way. > > mycmd.sh < input.txt > output.txt > > The following example is not sufficient for this purpose. Could > anybody provide a minimal working example for the scenario that I > mentioned? Thanks. > > https://flask.palletsprojects.com/en/1.1.x/quickstart/ > > Thanks. > > -- > Regards, > Peng > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaskee at protonmail.com Thu Jul 2 18:45:54 2020 From: flaskee at protonmail.com (flaskee) Date: Thu, 02 Jul 2020 22:45:54 +0000 Subject: [Flask] Is there a centralized way .. to preprocess URL requests headed to routes.py? Message-ID: <5OZARfcYg3kdDeIIvmB3TFujaW98SX2yEZE-70_Re7Ynq91fE2ulYXRebOsYQ4dT73XKSwvmniLNgLYxVi3YvXXQu1ZjzqlTEvHNNd1EdSc=@protonmail.com> routes.py will have possibly many decorators for different pages of a webpage. I'm wondering if there is one central place to inspect *any* request made against a flask site; before it gets to each decorator? The hacking attacks now adays are many and varied --and it would be nice to be able to log or pre-process ALL page requests; to look for SQL attacks, URL injection attacks, etc. Even if the pages being requested are not really on your site; and they are just wildly trying things. Just a way to see/touch EVERYTHING before it hits the decorators. Is there a way to do this? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabor at szabgab.com Fri Jul 3 01:04:37 2020 From: gabor at szabgab.com (Gabor Szabo) Date: Fri, 3 Jul 2020 08:04:37 +0300 Subject: [Flask] Is there a centralized way .. to preprocess URL requests headed to routes.py? In-Reply-To: <5OZARfcYg3kdDeIIvmB3TFujaW98SX2yEZE-70_Re7Ynq91fE2ulYXRebOsYQ4dT73XKSwvmniLNgLYxVi3YvXXQu1ZjzqlTEvHNNd1EdSc=@protonmail.com> References: <5OZARfcYg3kdDeIIvmB3TFujaW98SX2yEZE-70_Re7Ynq91fE2ulYXRebOsYQ4dT73XKSwvmniLNgLYxVi3YvXXQu1ZjzqlTEvHNNd1EdSc=@protonmail.com> Message-ID: On Fri, Jul 3, 2020 at 2:23 AM flaskee via Flask wrote: > routes.py will have possibly many decorators for different pages of a > webpage. > > I'm wondering if there is one central place to inspect *any* request made > against a flask site; > before it gets to each decorator? > > The hacking attacks now adays are many and varied --and it would be nice to > be able to log or pre-process ALL page requests; to look for SQL attacks, > URL injection attacks, etc. > *Even if the pages being requested are not really on your site;* and they > are just wildly trying things. > > Just a way to see/touch EVERYTHING before it hits the decorators. > > Is there a way to do this? > > Thanks > > Do you mean something like this that runs before every request? - @app.before_request - def before_request(): - app.logger.info("before_request") -- Gabor Szabo http://szabgab.com/ Code Maven http://code-maven.com/flask -------------- next part -------------- An HTML attachment was scrubbed... URL: From arj.python at gmail.com Fri Jul 3 03:05:55 2020 From: arj.python at gmail.com (Abdur-Rahmaan Janhangeer) Date: Fri, 3 Jul 2020 11:05:55 +0400 Subject: [Flask] FlaskCon: Today Friday 3rd July, Tomorrow and Sunday! Message-ID: Greetings List, FlaskCon is this week! Speakers include many interesting people such as: - Dustin Ingram - Adrian M?nnich (ThiefMaster) and a host of beautiful topics and diverse mix such as: - How Google cloud uses Flask - Demystifying Flask's Application and Request Contexts with pytest - How the FEC uses Flask to increase transparency in US elections - Running Flask on Kubernetes 3rd , 4th and 5th July! Today's schedule includes interviews at 15:00 GMT with the authors of - DTale - Creatorlist This is the perfect session for beginners to attend so that FlaskCon is worth attending even for non-Flask people As panelists you have organisers and reviewers like - David Lord - Miguel Grinberg - Grey Li and others How to attend? See here: https://flaskcon.com/#faq Please spread the word ^^ Kind Regards, Abdur-Rahmaan Janhangeer compileralchemy | blog github Mauritius -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaskee at protonmail.com Fri Jul 3 10:48:13 2020 From: flaskee at protonmail.com (flaskee) Date: Fri, 03 Jul 2020 14:48:13 +0000 Subject: [Flask] Is there a centralized way .. to preprocess URL requests headed to routes.py? In-Reply-To: References: <5OZARfcYg3kdDeIIvmB3TFujaW98SX2yEZE-70_Re7Ynq91fE2ulYXRebOsYQ4dT73XKSwvmniLNgLYxVi3YvXXQu1ZjzqlTEvHNNd1EdSc=@protonmail.com> Message-ID: <68pMqot9RrL6UUZ0ngf0sOt-OKuZ-0fEU8zW82OTXQIQEmXx-AosJUKmRpJ8xUxfS3NRRAzvwUnJhMf9vetJatotbkvuJnL77XIb9lbMwI0=@protonmail.com> ??????? Original Message ??????? > On Fri, Jul 3, 2020 at 2:23 AM flaskee via Flask wrote: > >> routes.py will have possibly many decorators for different pages of a webpage. >> >> I'm wondering if there is one central place to inspect *any* request made against a flask site; >> before it gets to each decorator? >> >> The hacking attacks now adays are many and varied --and it would be nice to >> be able to log or pre-process ALL page requests; to look for SQL attacks, URL injection attacks, etc. >> Even if the pages being requested are not really on your site; and they are just wildly trying things. >> >> Just a way to see/touch EVERYTHING before it hits the decorators. >> >> Is there a way to do this? >> >> Thanks > > Do you mean something like this that runs before every request? > > - @app.before_request > > - def before_request(): > > - app.logger.info("before_request") Oooooooooooo -- Yes I do! Thank you! I just need to get it to show show the actual URL/parms being called. I'm already here now... @app.before_request def before_request(): app.logger.info("before_request_hits log" + request.environ['REMOTE_ADDR'] + ")" ) [10:38:07] {/routes.py:56} INFO - before_request_hits log (8.8.8.8) [10:38:07] {/routes.py:56} INFO - before_request_hits log (8.8.8.8) [10:38:07] {/routes.py:56} INFO - before_request_hits log (8.8.8.8) Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaskee at protonmail.com Fri Jul 3 11:05:41 2020 From: flaskee at protonmail.com (flaskee) Date: Fri, 03 Jul 2020 15:05:41 +0000 Subject: [Flask] [solved] Re: Is there a centralized way .. to preprocess URL requests headed to routes.py? Message-ID: @app.before_request def before_request(): app.logger.info("before_request_hits from: " + request.environ['REMOTE_ADDR'] + " called: " + request.url ) Thank you Gabor! -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaskee at protonmail.com Fri Jul 3 11:16:12 2020 From: flaskee at protonmail.com (flaskee) Date: Fri, 03 Jul 2020 15:16:12 +0000 Subject: [Flask] [solved] Re: Is there a centralized way .. to preprocess URL requests headed to routes.py? In-Reply-To: References: Message-ID: request . remote_addr could replace the .environ[] part. (I just wanted to remind myself of both approaches). > @app.before_request > def before_request(): > app.logger.info("before_request_hits from: " + request.environ['REMOTE_ADDR'] + " called: " + request.url ) > > Thank you Gabor! -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcnarc at xiplink.com Wed Jul 15 17:25:39 2020 From: marcnarc at xiplink.com (Marc Branchaud) Date: Wed, 15 Jul 2020 17:25:39 -0400 Subject: [Flask] Detecting when the server dies Message-ID: Hi all, I run flask under lighttpd with flup for FCGI. This runs on a single machine, and I've configured lighttpd to launch the FCGI processes itself, rather than have them live independently. One of the things I use flask for is to invoke an old CGI binary and send its output to the browser. The CGI subprocess is simply linked to the Response with direct_passthrough=True. Occasionally something causes lighttpd to crash. When that happens, the system automatically restarts lighttpd so that the web service stays up. Thing is, the crashed lighttpd's flask children get zombie'd to the init process, and they never die. If the CGI is running when this happens. the subprocess buffer fills up, then everything blocks. Unfortunately the old CGI binary does some coarse-grained locking, and so later invocations of that binary (under the new lighttpd process) block waiting for the zombie-child instance to exit. I agree that there's a lot weird about this setup, but I'd like to focus on why the flask children don't see that the lighttpd socket has closed. I would expect them to see that the socket they're writing to has closed prematurely, and deal with that (or at least crash). I'm not even sure where to look to start figuring this out. Somewhere in Werkzeug, perhaps? Any insights would be most appreciated! M. From ccp at drsb.com.my Thu Jul 16 23:00:59 2020 From: ccp at drsb.com.my (CCP Dragonedge) Date: Fri, 17 Jul 2020 11:00:59 +0800 Subject: [Flask] Can ping the server, but can't access the Flask app Message-ID: Hi, What I want to do is to grab the IP address of the client. In my Flask code, after the user logs in, I just do the following in my app's menu page: {{ request.remote_addr }} To test, I set up two Windows boxes at home. One is running Windows 7, the other running Windows 10. The Win10 box contains the Flask server. It runs on my home network (connects through wifi). When I go to http://api.ipify.org to get the public IP address, it returns 174.141.xxx.xxx. So, I connected the Win7 box through my phone's hotspot (i.e. using a different network). I then go to ipify to get this box's current public address, and get something like 115.164.xxx.xxx. When I ping 174.141.xxx.xxx (ie the Win10 box) from the Win7 box, no problems. But when I ping 115.164.xxx.xxx (ie the Win7 box) from the Win10 box, all packets are lost. For the purposes of my tests, I think this is weird, but not a big deal. My Flask server sits on the Win10 box, and the Win7 box can see it, so I should be able to test, right? So, on the Win10 box, I start up the server like so: flask run --host=0.0.0.0 The server starts up without any problems (says it's running on 0.0.0.0:5000 ). Then, I go to my Win7 box, open up a browser, and type: http://174.141.xxx.xxx:5000 But can't see the site! Specifically, the error message says: "resource (174.141.xxx.xxx) is online but isn't responding to connection attempts" Proxy settings on the client are off, and I'm pretty sure there aren't any add-ons on the browser. Anyone have any idea what's going on? Why can I ping the server, but not access the Flask app? I know this question isn't specific to Flask, but I've been looking at the answer for the last day or so, and don't know where else to look. I'm also totally clueless when it comes to network stuff (as this question shows). Any help is much appreciated. Thanks, p -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaskee at protonmail.com Wed Jul 22 15:07:26 2020 From: flaskee at protonmail.com (flaskee) Date: Wed, 22 Jul 2020 19:07:26 +0000 Subject: [Flask] Flask ways to get from the server to the front-end, short of JS? Message-ID: I like backend driven sites, rather than client heavy [React, Vue] js frameworks. In fact, I'd like to have the sites operate Without JS, as much as possible. Are there ways/what are the ways to get back and forth between server and client short of JS or a page refresh? (I'm OK at XMLHttpRequest and it works well; but just seeing what others have used that does not count on javascript.) Thanks! Sent with [ProtonMail](https://protonmail.com) Secure Email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ub at artfacts.net Thu Jul 23 05:43:05 2020 From: ub at artfacts.net (ulrich) Date: Thu, 23 Jul 2020 11:43:05 +0200 Subject: [Flask] Flask ways to get from the server to the front-end, short of JS? In-Reply-To: References: Message-ID: <6c6f4e57-97c1-60dc-7b40-e23d8d947e67@artfacts.net> On 2020-07-22 21:07, flaskee via Flask wrote: > > I like backend driven sites, rather than client heavy [React, Vue] js > frameworks. there's "light" frameworks too. check svelte https://svelte.dev/ for example. of course for purists there is always vanilla javascript if you have the time to write things from scratch. > > In fact, I'd like to have the sites operate Without JS, as much as > possible. > > Are there ways/what are the ways to get back and forth between server > and client short of JS or a page refresh? sure! have a look at web assembly: https://webassembly.org/ runs natively in the browser, boasts a light footprint, might be exactly what you're looking for. additionally use websockets to communicate and you should be very efficient. > > (I'm OK at XMLHttpRequest and it works well; but just seeing what > others have used that does not count on javascript.) > > Thanks! > you're welcome, have fun! ub > Sent with ProtonMail Secure Email. > > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaskee at protonmail.com Thu Jul 23 11:45:04 2020 From: flaskee at protonmail.com (flaskee) Date: Thu, 23 Jul 2020 15:45:04 +0000 Subject: [Flask] Flask ways to get from the server to the front-end, short of JS? In-Reply-To: References: <6c6f4e57-97c1-60dc-7b40-e23d8d947e67@artfacts.net> Message-ID: .. Actually ... it looks like web assembly is pretty thick on javascript itself. Supported languages to build one with look to be a list of favs from Microsoft, Google, Apple and Mozilla. You know, c#, rust, swift, go. I looked for a working example involving Flask, but only got this close (it uses .js) https://dev.to/sayanarijit/create-dev-s-offline-page-with-python-pyodide-and-webassembly-241h -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaskee at protonmail.com Thu Jul 23 16:09:54 2020 From: flaskee at protonmail.com (flaskee) Date: Thu, 23 Jul 2020 20:09:54 +0000 Subject: [Flask] Python lists like this? Message-ID: <5h6kR2U3SmzOCOQQU657jho_2885mtX7Q2PF1giuPF4k04wBdXxVE0S_IabwgsPiyS7eHUyUINk4ewVJDpdbnY_TuoqgomqI-05fPm2NpUc=@protonmail.com> Is there a "best" email list for python here? https://mail.python.org/mailman/listinfo (There are hundreds) Is there a better python mailing list elsewhere? Thanks! Sent with [ProtonMail](https://protonmail.com) Secure Email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cs at cskk.id.au Fri Jul 24 18:34:57 2020 From: cs at cskk.id.au (Cameron Simpson) Date: Sat, 25 Jul 2020 08:34:57 +1000 Subject: [Flask] Python lists like this? In-Reply-To: <5h6kR2U3SmzOCOQQU657jho_2885mtX7Q2PF1giuPF4k04wBdXxVE0S_IabwgsPiyS7eHUyUINk4ewVJDpdbnY_TuoqgomqI-05fPm2NpUc=@protonmail.com> References: <5h6kR2U3SmzOCOQQU657jho_2885mtX7Q2PF1giuPF4k04wBdXxVE0S_IabwgsPiyS7eHUyUINk4ewVJDpdbnY_TuoqgomqI-05fPm2NpUc=@protonmail.com> Message-ID: <20200724223457.GA75212@cskk.homeip.net> On 23Jul2020 20:09, flask wrote: >Is there a "best" email list for python here? >https://mail.python.org/mailman/listinfo >(There are hundreds) "python-list" for general discussion, "tutor" for learning questions if you're new to Python (or parts of Python). Both those lists drop attachments; paste stack traces and code into the message as text, avoid screenshots. We like the inline reply style on the whole, as in this message: reply below each piece of relevant text (like a cvonversation) and trim the irrelevant quoted text for readability. >Is there a better python mailing list elsewhere? No. (Actually, one cannot disprove a negative.) Cheers, Cameron Simpson From larry.martell at gmail.com Thu Jul 30 17:48:38 2020 From: larry.martell at gmail.com (Larry Martell) Date: Thu, 30 Jul 2020 17:48:38 -0400 Subject: [Flask] reoccurring intermittent sqlalchemy crash Message-ID: I have a flask app that uses sqlalchemy. The app will run fine for some amount of time - 1 day or 2 weeks - no pattern. Then one day it will crash with this stack trace: File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 1114, in _execute_context conn = self._revalidate_connection() File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 424, in _revalidate_connection "Can't reconnect until invalid " sqlalchemy.exc.InvalidRequestError: Can't reconnect until invalid transaction is rolled back The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/mnt/efs/md-dm-limeprocessor/limeprocessor.py", line 2489, in generate_survey_emails email_dict, invalid = get_email_dict(survey, survey_id, s, False, email_type) File "/mnt/efs/md-dm-limeprocessor/limeprocessor.py", line 2323, in get_email_dict for p in participants.all(): File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/orm/query.py", line 2703, in all return list(self) File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/orm/query.py", line 855, in __iter__ return self._execute_and_instances(context) File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/orm/query.py", line 2878, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 945, in execute return meth(self, multiparams, params) File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement compiled_sql, distilled_params File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 1121, in _execute_context None, None) File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception exc_info File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise raise value.with_traceback(tb) File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 1114, in _execute_context conn = self._revalidate_connection() File "/home/ec2-user/vpy3/ls/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 424, in _revalidate_connection "Can't reconnect until invalid " sqlalchemy.exc.StatementError: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back [SQL: 'SELECT limesurvey.lime_tokens_104.tid AS limesurvey_lime_tokens_104_tid, limesurvey.lime_tokens_104.participant_id AS limesurvey_lime_tokens_104_participant_id, limesurvey.lime_tokens_104.firstname AS limesurvey_lime_tokens_104_firstname, limesurvey.lime_tokens_104.lastname AS limesurvey_lime_tokens_104_lastname, limesurvey.lime_tokens_104.email AS limesurvey_lime_tokens_104_email, limesurvey.lime_tokens_104.emailstatus AS limesurvey_lime_tokens_104_emailstatus, limesurvey.lime_tokens_104.token AS limesurvey_lime_tokens_104_token, limesurvey.lime_tokens_104.language AS limesurvey_lime_tokens_104_language, limesurvey.lime_tokens_104.blacklisted AS limesurvey_lime_tokens_104_blacklisted, limesurvey.lime_tokens_104.sent AS limesurvey_lime_tokens_104_sent, limesurvey.lime_tokens_104.remindersent AS limesurvey_lime_tokens_104_remindersent, limesurvey.lime_tokens_104.remindercount AS limesurvey_lime_tokens_104_remindercount, limesurvey.lime_tokens_104.completed AS limesurvey_lime_tokens_104_completed, limesurvey.lime_tokens_104.usesleft AS limesurvey_lime_tokens_104_usesleft, limesurvey.lime_tokens_104.validfrom AS limesurvey_lime_tokens_104_validfrom, limesurvey.lime_tokens_104.validuntil AS limesurvey_lime_tokens_104_validuntil, limesurvey.lime_tokens_104.mpid AS limesurvey_lime_tokens_104_mpid, limesurvey.lime_tokens_104.attribute_1 AS limesurvey_lime_tokens_104_attribute_1, limesurvey.lime_tokens_104.attribute_2 AS limesurvey_lime_tokens_104_attribute_2, limesurvey.lime_tokens_104.attribute_3 AS limesurvey_lime_tokens_104_attribute_3, limesurvey.lime_tokens_104.attribute_4 AS limesurvey_lime_tokens_104_attribute_4, limesurvey.lime_tokens_104.attribute_5 AS limesurvey_lime_tokens_104_attribute_5, limesurvey.lime_tokens_104.attribute_11 AS limesurvey_lime_tokens_104_attribute_11, limesurvey.lime_tokens_104.attribute_12 AS limesurvey_lime_tokens_104_attribute_12, limesurvey.lime_tokens_104.attribute_6 AS limesurvey_lime_tokens_104_attribute_6, limesurvey.lime_tokens_104.attribute_7 AS limesurvey_lime_tokens_104_attribute_7, limesurvey.lime_tokens_104.attribute_8 AS limesurvey_lime_tokens_104_attribute_8, limesurvey.lime_tokens_104.attribute_9 AS limesurvey_lime_tokens_104_attribute_9, limesurvey.lime_tokens_104.attribute_10 AS limesurvey_lime_tokens_104_attribute_10, limesurvey.lime_tokens_104.attribute_13 AS limesurvey_lime_tokens_104_attribute_13, limesurvey.lime_tokens_104.attribute_14 AS limesurvey_lime_tokens_104_attribute_14 \nFROM limesurvey.lime_tokens_104'] [parameters: [{}] The last line says Can't reconnect until invalid transaction is rolled back but the SQL shown is a select that is generated by sqlalchemy and that SQL runs many times before I get this crash. Anyone have any ideas on how I can debug and fix this, or if not that, code to recover from it so I do not have to restart the app. From keith at the-sanctuary.biz Fri Jul 31 12:34:25 2020 From: keith at the-sanctuary.biz (keith at the-sanctuary.biz) Date: Fri, 31 Jul 2020 17:34:25 +0100 Subject: [Flask] reoccurring intermittent sqlalchemy crash (Larry Martell) In-Reply-To: References: Message-ID: <9c72839574a93ae20a9db40408aaf1b5@the-sanctuary.biz> Hi Larry I'm wondering if it matched the few occasions when I've experienced something similar. (runs for months and then crashes). One time a NULL value had crept through unchecked and SQLAlchemy didn't like it. Is your SELECT missing a WHERE clause perhaps? Are you able to view the data directly in the SQL Server? Is there anything unusual in it? Like too-long strings, or non-ASCII or extended charset Unicode characters? Hope that helps Keith > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 30 Jul 2020 17:48:38 -0400 > From: Larry Martell > To: flask at python.org > Subject: [Flask] reoccurring intermittent sqlalchemy crash > Message-ID: > > Content-Type: text/plain; charset="UTF-8" > > I have a flask app that uses sqlalchemy. The app will run fine for > some amount of time - 1 day or 2 weeks - no pattern. Then one day it > will crash with this stack trace: >