« first day (4992 days earlier)      last day (170 days later) » 

00:29
@Qualcuno2 I see you solved it but next time please be sure to make your example reproducible and minimal ([mcve]). a) Most users won't have gym package installed, so import gym will fail. b) So they'll have no idea what get_discrete_state(env.reset()) is doing. We don't know what env.reset() returns, print it, show us it what it is, don't make us hunt for the documentation. c) Aggressively strip your example down to the minimal..
...fir examplem if you can fake out the env.reset()call and replace it with a dict, or whatever, just to illustrate your issue, then do. d) As roganjosh said, you have to state what your issue is (an exception? show it? wrong output? show it, and explain why its wrong, and what you expected?)
^^ Here's the link for MCVE. "How to create a Minimal, Reproducible Example"
^^ sorry for all the typos.
 
1 hour later…
01:36
PSA: my issue trying to import with pandas.read_xml turns out to be the well-known issue that XML can't handle unescaped & ampersands, although the error is cryptic "lxml.etree.XMLSyntaxError: xmlParseEntityRef: no name, line X..". However curl/ curl -d/ curl -G are all merrily downloading the XML file with ampersand, and also no CRLF line-endings. So it's less grief to hack it.
 
2 hours later…
03:48
more developers need to treat "the error message doesn't accurately describe what went wrong" as a defect, even when it's caused by user error
(especially, even)
 
1 hour later…
05:04
@smci How does that happen so often?
05:16
It's disappointing that "chat" doesn't appear in the developer survey still, since that's where I spend most of my time on the SE network :(
 
6 hours later…
10:48
blargh
"noooo that isn't a duplicate, I use == while that question uses <=" (the problem is that Django templates apparently require whitespace on either side of the operator) (also OP didn't phrase the objection like that, but apparently doesn't understand what "boolean operator" means)
 
7 hours later…
18:07
I am currently solving a problem with help of a few nested dictionaries. Would you say flattening is generally good pattern?
So to avoid dictionary of dictionary?
Depends entirely on the use case, I'd say
Put differently, can you imagine a use case where flattening is a bad pattern? Or also depends?
It comes with additional translators but feels somehow cleaner to me
I can't think of a specific situation, but I'm sure there are some where flattening would be a bad idea
Cheers mate
 
5 hours later…
23:31
If flattening were always good, the dictionaries wouldn't be nested in the first place.
23:57
@roganjosh What: XML containing unescaped & ampersands? Depends on your data. The European Parliament has two MEPs from a party with ampersand: europarl.europa.eu/meps/en/full-list/all
                 fullname  Country Group      Id                           Party  CC
203        Cindy FRANSSEN  Belgium   EPP  197455  Christen-Democratisch & Vlaams  BE
644  Tom VANDENKENDELAERE  Belgium   EPP  129164  Christen-Democratisch & Vlaams  BE

« first day (4992 days earlier)      last day (170 days later) »