« first day (4735 days earlier)      last day (65 days later) » 

3:17 AM
fixed the issue using relative filepaths
 
3:40 AM
has anyone here encountered UML before?
 
 
4 hours later…
7:43 AM
I know I'm opening a can of worms, but is the AI ban also on questions about LLM? As in, "Why doesn't this work the way I want"?
 
@matszwecja As in, about why the LLM doesn't work the way you want, or why something an LLM wrote doesn't work the way you want?
 
the first
 
Yeah, those are not banned under that policy. Whether it's on-topic is another matter, but generally questions about interacting with an LLM programmatically would be on0-topic as well.
 
8:22 AM
Hi, I am developing an application in python using boto3
I need to know whether this is good approach to look at the implementation of boto3 what exception it raises and handle that exception accordingly, whether it raises multiple arguments in exception
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/athena/client/get_query_execution.html
 
8:36 AM
I want your personal opinion on this:when you write SQL queries you use ORM or raw sql?
 
@jeea You would need to be more specific about what you want to do here
As you have identified, the exception might be in a JSON response and the bloated and overblown API of boto3 doesn't make it clear whether you need to parse out the body of the response or whether boto3 will throw a python exception
@DimitrisPapageorgiou I... use a mix
 
I am handling an exception in my python script which queries athena
there can be multiple kinds of errors, (this is specific to aws, not related to python)
so there can be either query failure or service failure, so needed check on kind of exception raised by athena so that logging can be better
just a random question, why a mix, do you work on many databases
also orms are specific to relational dbs or are there for nosql dbs aswell (or inmem dbs?)
 
8:52 AM
For AWS errors, if it's always in the JSON payload then I usually just detected whether there was an Error key. I can't see the code that I had for this now as it was at another company but it was an immense pain
Lots of the errors "lie" too. It will tell you that a file can't be found if your credentials are not found or have expired
Since env var credentials are time-limited, a working program might suddenly transition to telling you the file path is not found, but actually you just got signed out. It's difficult to discern whether you gave a bad path
For the ORM it depends on what I want. The fastest way for bulk results is to use raw queries. The ORM is an extra layer that will build python objects for every row (classes, potentially with eager relationships) that I don't necessarily need
For NoSQL, I don't have enough experience to answer
@roganjosh or if your credentials don't have permission for that bucket. You can't just block boto3 out of your memory
 
 
3 hours later…
12:11 PM
@roganjosh usually when you use ORM and when raw sql?
 
I already answered that in my comments above
If I'm making a complex query using CTEs and I want the results in a DataFrame at the end, for example (pandas or polars), then there is no reason for me to use the ORM layer
Given the choice I will use SQLA to define my tables because tracking changes with Alembic is awesome but it doesn't mean that I want tonnes of instances of the class on every query
 
 
2 hours later…
2:06 PM
Is there anyone here being experienced in langchain library and using Multiple Retrievals?
 
2:25 PM
@muratowski if this is about your recent question please note our room rules in regards to waiting 48 hours before discussing it here
You also really need to tag it with otherwise basically nobody would see it
 
2:42 PM
@roganjosh Oh, thanks for the tip and the warning. I'll be waiting then.
 
I want to do some web scrapping....I want to get the names depicted in the middle column here giortes.gr/data/eortes/namedays_D.php (white background) many td elements....what library do you propose...beautifulSoup makes it hard
 
3:05 PM
@DimitrisPapageorgiou you could use this:
import pandas as pd

dfs = pd.read_html('https://www.giortes.gr/data/eortes/namedays_D.php')
print(dfs[6].iloc[:, 0])
print(dfs[6].iloc[:, 0].values.tolist()) if you just want the list
 
very interesting... I did not know pandas does web scrapping
 
scraping*
 
It has layers on top of BS4 to find tables in web pages, that's why I'm using the 6th index to get at the table you want from the ones it parsed out
 
4:06 PM
Wait, wut, Flask is now on version 3.0. Huh, I don't know how I missed that one coming
 
4:18 PM
And actually it's totally borked my project. I guess there's a reason why it's a HNQ. The linkage with werkzeug is a mess
And it's broken flask-wtf. Don't upgrade
 
 
1 hour later…
5:51 PM
...reasons why people need to test/develop w/ DeprecationWarnings enabled
werkzeug.urls has been deprecated months ago
 
The dependencies between the two libraries do not align
I don't actually use flask-wtf directly at all, and I don't know where connexion comes from but that seems to be in the middle of it
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
connexion 2.14.2 requires flask<2.3,>=1.0.4, but you have flask 3.0.0 which is incompatible.
connexion 2.14.2 requires werkzeug<2.3,>=1.0, but you have werkzeug 3.0.0 which is incompatible.
I can obviously fix it locally by just changing my pinned versions, but it doesn't seem possible to bump both packages at once atm and that's a release issue, not a me issue
 
that's connection's fault then
 
I don't know what that is. I guess I'll have to run JonnyDep over it to find the dependency tree
 
well, what are you using directly? ;)
 
For ref, this is my requirements.txt so it's not like I'm using anything exotic:
Flask>=2.2.3
Flask_Login>=0.6.2
python-dotenv>=1.0.0
setuptools>=67.4.0
SQLAlchemy>=2.0.6
alembic>=1.10.2
Werkzeug==2.2.2
argon2-cffi==21.3.0
I have pinned Wekzeug there just to get it back to working, but that forces a downgrade of Flask
 
5:58 PM
try flask<3 and werkzeug<3
 
But that defeats the point?
 
anyway, the problem you have is happening because you are not pinning your dependencies properly
maybe you got some crap in your virtualenv from elsewhere? nothing from those deps should install connexion
 
Taking a step back here: I'm not complaining about the fact that I can't get it working. I'm remarking on the fact that the pallets ecosystem seems to be out of sync with itself in the latest releases
 
it isn't. you install the latest flask and werkzeug and it works
or you pin the latest versions that were released at a given point in time, and it works
FWIW, this is what you should do: create a requirements.in with this content:
alembic
argon2-cffi
flask
flask-login
python-dotenv
sqlalchemy
then run pip-compile which will create a requirements.txt with all your (transitive) dependencies
at that point you have a snapshot of versions that are likely to compatible (assuming anything in that list is compatible - if e.g. flask-login is outdated, then you'd still have issues ofc - in that case you would pin e.g. flask<3 and werkzeug<3 in requirements.in until there's a new release of the incompatible package)
 
Using your unpinned requirements, I get this
 
6:05 PM
then, at a later point, when you want to update your deps, you'd run pip-compile -U which will rewrite your requirements.txt with the latest versions that are compatible (based on their dependency specs). of course you need to install those new deps and test if everything still works. personally i read changelogs of all the updates packages at that point, at least if it's not just a x.x.y patch level increment
OK, so flask-login is not compatible yet
(fwiw, flask-login is NOT a pallets project)
it looks like they merged a PR yesterday that fixes it, but haven't made a new release yet
 
Yeah, there's also this issue
I also got this runtime error while I was messing about but I'm not sure what state I was in at that point. I'll try recreate
 
6:20 PM
old version of flask-wtf?
that's a deprecated export in flask that got removed in 3.0
 
I'll hold my hands up here because I'm not sure how I got into that dependency hole now :D
 
try pinning flask and werkzeug as <3 and then use pip-compile to resolve your other deps :)
i think that'll fix it
and once flask-login has been updated, remove the pins and pip-compile -U to update everything
 
6:36 PM
Tis all good thanks :) I just "broke" it out of curiosity because of the HNQ and I was curious
I was trying to get back to the werkzeug issue state, but I can't now recreate it
 

« first day (4735 days earlier)      last day (65 days later) »