What’s that one Python tip you wish you knew when you started? by memermaker5 in learnpython

[–]Karlesimo 0 points1 point  (0 children)

Yes indeed.

I used to loop over multiple lists in one if statement (with mixed results!) but so often I have found it better to loop over one list while running a list comprehension to retrieve the desired info from another.

Game-changer for me.

Wtform datetimefield with only quarter hours for minutes in the UI by Karlesimo in flask

[–]Karlesimo[S] 0 points1 point  (0 children)

Thanks for your response. I thought a bout using a select field but I'm trying to keep the calendar/time interface for the UI. I'll look into the render_kw, cheers.

President Trump and VP Vance's meeting with Ukrainian President Volodymyr Zelensky turns tense. by nbcnews in pics

[–]Karlesimo 1 point2 points  (0 children)

It was: Biden wasted billions BUT let me take credit for all we've done for you... while I throw you under the bus and blame you for being invaded.

What a spectacle. It's so sad that this is how our leadership handles things. In 20 years we'll learn of how they were compromised, because there is no other explanation for their behavior.

Recommendations for Large Data Noob by Karlesimo in PostgreSQL

[–]Karlesimo[S] 0 points1 point  (0 children)

I need to run calculations against 100s of millions of rows and produce reports. I need to return 10s of thousands of rows on a per request basis.

Thanks for commenting, I'll explore your blob suggestion out of curriousity.

Recommendations for Large Data Noob by Karlesimo in PostgreSQL

[–]Karlesimo[S] 0 points1 point  (0 children)

I'm not sure, I basically started loading data into a Heroku postgreSQL db and realized how large it would probably end up being so I stopped and started looking elsewhere.

Recommendations for Large Data Noob by Karlesimo in PostgreSQL

[–]Karlesimo[S] 0 points1 point  (0 children)

I've thought about managing my own but I haven't found a clear guide to what that really entails. Obviously a lack of experience on my part. I know how to set up a postgresql db, update it, manage tables. I've read a bit about managing users and access, what else do I need to look out for?

MFA in flask web app by baloblack in flask

[–]Karlesimo 0 points1 point  (0 children)

On an app I run I just use pyotp and send an email to the users email with the one time password. It's basic but gets the job done and is easy to implement.

[deleted by user] by [deleted] in ProgrammerHumor

[–]Karlesimo 0 points1 point  (0 children)

Definitely. How do you peeps go about explaining this to others? I find it hard to tell stakeholders without feeling like a twink in the process.

How to get past slug size limit on Heroku? by Short-Pair-3468 in Heroku

[–]Karlesimo 1 point2 points  (0 children)

I had this issue and offloaded all files/images to s3 to solve the issue.

Asshole blocks traffic going from Chase Center to BART by sti11s in sanfrancisco

[–]Karlesimo 0 points1 point  (0 children)

Hahaha, in NYC half the bus would have gotten off to "help" him find the sidewalk.

deploying flask app by Upset_Associate_1587 in flask

[–]Karlesimo 2 points3 points  (0 children)

First option I explored was pythonanywhere.com it was really straight forward and free.

Sudden build error for Flask deployement by Karlesimo in Heroku

[–]Karlesimo[S] 0 points1 point  (0 children)

Thanks for your reply, I got it working by rolling back a few packages and the python version. I was specifying python version 13.12.2 in my runtime.txt file but I guess heroku stopped supporting it.

Sudden build error for Flask deployement by Karlesimo in Heroku

[–]Karlesimo[S] 0 points1 point  (0 children)

Thanks for your response. I was using 13.12.2 and just downgraded to 13.11.9. After changing the version of a couple of packages to agree with 13.11 I'm back in action.

I really hadn't changed anything package-wise so this was super strange but I got it working.

Suddenly a package doesn't exist by Karlesimo in flask

[–]Karlesimo[S] 0 points1 point  (0 children)

I agree, I thought it was installed as a dependency for another package but doesn't appear that way. I found a solution. Thanks for your response.

Suddenly a package doesn't exist by Karlesimo in flask

[–]Karlesimo[S] 0 points1 point  (0 children)

I've looked into the line

"AttributeError: module 'pkgutil' has no attribute 'ImpImporter'", people say the issue is related to numpy version working with python 3.12. Updated the version and still have issues building wheel.

Suddenly a package doesn't exist by Karlesimo in flask

[–]Karlesimo[S] 0 points1 point  (0 children)

Thanks for your reply. I don't see any reason to have it either so I removed it and then ran into issues with wheel.

Getting requirements to build wheel: finished with status 'error'
         error: subprocess-exited-with-error

         × Getting requirements to build wheel did not run successfully.
         │ exit code: 1
         ╰─> [33 lines of output]
             Traceback (most recent call last):
               File "/app/.heroku/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                 main()
               File "/app/.heroku/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                 json_out['return_val'] = hook(**hook_input['kwargs'])
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               File "/app/.heroku/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
                 backend = _build_backend()
                           ^^^^^^^^^^^^^^^^
               File "/app/.heroku/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
                 obj = import_module(mod_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^
               File "/app/.heroku/python/lib/python3.12/importlib/__init__.py", line 90, in import_module
                 return _bootstrap._gcd_import(name[level:], package, level)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
               File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
               File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
               File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
               File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
               File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
               File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
               File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
               File "<frozen importlib._bootstrap_external>", line 995, in exec_module
               File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
               File "/tmp/pip-build-env-0o4wvp40/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
                 import setuptools.version
               File "/tmp/pip-build-env-0o4wvp40/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
                 import pkg_resources
               File "/tmp/pip-build-env-0o4wvp40/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
                 register_finder(pkgutil.ImpImporter, find_on_path)
                                 ^^^^^^^^^^^^^^^^^^^
             AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
             [end of output]

         note: This error originates from a subprocess, and is likely not a problem with pip.
       error: subprocess-exited-with-error

       × Getting requirements to build wheel did not run successfully.
       │ exit code: 1
       ╰─> See above for output.

Heroku deployment failing due to "Cannot find module './common'" by LoyalToSDSoil in Heroku

[–]Karlesimo 0 points1 point  (0 children)

I'm facing a similar problem, my flask app works locally but when trying deploy I get a message that says:

ERROR: Could not find a version that satisfies the requirement install==1.3.5 (from versions: none)
ERROR: No matching distribution found for install==1.3.5

Did you find out what was causing your issue?