« first day (2960 days earlier)      last day (1989 days later) » 

1:22 AM
@roganjosh Oh that's probably pretty easy - that's just a PATH issue. python probably doesn't mean the python you think it does. python -c "import sys; print(sys.executable)" will tell you which Python it is. I don't know where Conda installs it's python but that's the first check. If that's the right python then I can guarantee your PATH is not what it should be
 
 
4 hours later…
5:13 AM
I have a feeling my question is so dumb that I wouldn't need to code all that much and that certain methods already exist for that. Any cues? :/
 
 
2 hours later…
6:49 AM
AttributeError: Can't get attribute 'MyDict' on <module '__main__' from 'manage.py'>
does anyone know why this error occurs?code below
https://pastebin.com/JbWEm1hv
 
7:02 AM
Side note: is your dict different from collections.defaultdict(int)?
The problem is probably that your class is not visible in the global namespace
 
7:33 AM
@Aran-Fey: Probably impossible. Due to the way Python builds stack traces, func would have to mess with parts of the stack trace that are only constructed after func has already finished execution. It's not like Java, where the whole stack trace is created immediately.
 
Interesting, thanks
 
7:58 AM
maybe I shouldn't code at midnight either. raising with tb_next drops the initial line where the exception occurred, which is probably exactly the opposite of what should have happened.
 
Cabbage, I'm having a problem with the Python Logging module where I'm getting the following error:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\richi\Documents\GitHub\quilt\src\quilt_lang\__init__.py", line 2046, in loglevel
return logging.getEffectiveLevel()
AttributeError: module 'logging' has no attribute 'getEffectiveLevel'
```
The file in the exact commit at the exact line can be found here: https://git.io/fpRcx
 
@RichieBendall: Well, yeah. The logging module does not have a getEffectiveLevel function.
Logger objects have a method with that name.
 
8:13 AM
@user2357112 so... what should I do?
 
>>> from logging import getLogger
>>> log = getLogger(__name__)
>>> log.getEffectiveLevel()
30  # not an AttributeError
 
@RichieBendall: Correct your mental model of how logging levels work, then figure out how your design needs to change to fit the logging module. It's hard to say anything more specific than that without knowing more about your design.
Maybe you need your own logger object. Maybe you need to access the root logger. Maybe you need a deeper redesign.
The docstring for the function you linked to says "Set or get the logging level of Quilt", which suggests you probably shouldn't be using the root logger or setting global logging configuration.
 
@Arne Melon!
 
@RichieBendall: Note that the level returned by Arne's example code is a different level from the level you're configuring with those basicConfig calls.
 
8:29 AM
@RichieBendall Now that I look at the actual code you're using, I'm not so sure any more my example is helpful.
> This function does nothing if the root logger already has handlers configured for it.
Are you sure that's not the case?
 
 
1 hour later…
9:41 AM
cbg
 
10:27 AM
cbg
 
Cabbage
I find it strange that the solution to this question was to delete & re-install Python. Maybe it's a Windows thing...
 
Don't just dump all weirdness on Windows :P
I don't understand the protestations of the OP there, or what the answer actually clarifies. As a Windows representative of the room, there's nothing wrong with the code for me.
stackoverflow.com/questions/53444819/… typo. OP doesn't call the function.
 
:) Fair call. OTOH, it does seem to be a common pattern for Windows users that when things get bad to delete stuff & re-install it. I just don't understand how a Python installation could be functional enough to start compiling a script but then give a syntax error like that.
 
That's because Windows is not made for programmers in the same way Linux is. It's not so much the OS but the mentality of people using it. Same as turning off/on, you just rely on the paramedic scripts to fix whatever problem existed.
I'm not convinced the OP needed to take that action but, on the flip side, some things are just genuinely difficult on Windows. Installing the scientific stack is awful without things like Anaconda or the unofficial binaries
Without those two tools, you can genuinely expect that installation will fail in any number of ways and it won't even be consistent across two computers running the same version of the OS
 
11:07 AM
@roganjosh don't be so hard on yourself
 
When you're a Windows user on SO I kinda feel like I need to walk around windmilling my arms :P
 
11:21 AM
@roganjosh Sorry, I didn't intend to pick on Windows users. It's just that I have relatively little Windows experience, and most of that is as a regular user, not as a coder. I've been programming since the early 1970s, but I've probably spent a total of 3 months doing any kind of Windows-specific coding (mostly simple batch files).
 
Nah, I didn't take it as you picking on Windows users :)
 
Oh, good. :)
 
I actually don't know what I'll do when I need to upgrade my PC and laptop. By the next iteration of Windows I fear it will be completely unusable for programming
 
but you'll be able to draw with your finger
 
As it stands, Windows 7 is pretty robust for me and I can just run a VM for anything that's easier on Linux which, for me, always has a web API and I can just bridge the port and access from Windows. But they're honing the OS on tablets and, frankly crap, that is apparently aimed at making us all more productive (do I really need a detachable laptop screen so I can look at Facebook on a tablet?)
@AndrasDeak this is a key requirement. My participation on Meta is currently limited by my inability to draw true freehand circles
Oh, man. How does this happen when I even commented under the question that it's not correct?
 
11:35 AM
rolled it back
FWIW you can't ping submitters of edit suggestions, only editors
next time you see a factually wrong edit, press "reject and edit" instead
 
Yeah, it was just in case they spotted it. Then someone else came and approved it, then the OP themselves
Yeah, I should have done that, I just expected it to be flatly rejected tbh
 
you overestimate everyone :P
 
@roganjosh What the actual yam?!
 
Thank god that's rhetorical and I don't have to scramble for some defense :P
... people
 
12:11 PM
Hello!
Any ideas on how to make flask from editable so that user could add field
Like adding additional education
Or work experience
And how to reflect it in a model
 
@БеляковаАнастасия stackoverflow.com/questions/43859978/…?
I don't use WTForms but I imagine the "add field" button will trigger some AJAX function that will allow you to modify the form in Flask and send it back with the new fields generated
 
@roganjosh Thank you. I will try this answer
BTW I was never usign ajax and do not know it.
 
Then it's going to be clunky as hell I would imagine
The table that displays your form content only needs to be in a separate HTML file, and when the user wants to add a field, you just send that part of the page back and update a <div>
Otherwise you're going to refresh the entire page every time the user wants to add a field
Let me dig out an example. You'll need JQuery
@БеляковаАнастасия pastebin.com/9AqSzV9j is a skeleton I've just put together from one of my templates. The point is, you want to catch the user's click and then your Flask function only sends back, in this case, 'wip_planning/simulation_config_table.html'
 
12:29 PM
WOW! Thank you so much!
 
Welcome :)
 
1:04 PM
^ closed. Thanks
 
jpp
1:56 PM
stackoverflow.com/questions/53435556/… - dup, I managed to use my close vote on another reason
 
5 upvotes for a dupe and not one close vote. Silly.
 
jpp
@roganjosh, Maybe the people who found it don't have the rep?
 
I assume that's the case
 
Hammered
 
2:14 PM
rbrb for a bit
 
2:42 PM
@jpp I did search for a dupe before answering that question, but couldn't find a good one; I was hoping to find one that specifically sets the last column to a scalar.
 
jpp
@PM2Ring, good point, maybe we should link with list slicing (add extra dup)
the canonical on slicing does include indexing last element
 
@jpp Oh, ok. But my comment with the link to the docs is probably adequate.
 
jpp
@PM2Ring, Yes, I do agree. Should be sufficient.
I added that dup anyway. If OP understands those 2 Q&A, they'll be able to get the answer.
And, if they don't, they should specify which bit they don't get :)
oh I just saw your answer. didn't even see that earlier. there's no harm in undeleting your answer. (given you wrote it up)
ah, and it's now deleted by OP.
 
3:02 PM
Oh well.
 
3:23 PM
I think I'm well off-the-mark on this. Does anyone know exactly what the OP is asking? I don't know enough about async so I'm considering deleting my answer.
 
\o cbg
 
Cbg Mooing
 
4:18 PM
morning
cbg
 
Cbg
 
4:40 PM
Anyone know how to do a custom-positioned/custom-styled menu with QT/pyside2?
 
 
2 hours later…
6:19 PM
Hi
any ideas for implementing Locally Linear Embedding with map reduce? #bigdata
 
6:30 PM
it is something for dimension reduction
I want to map my data parts into small parts, and find the important ones, but I dont know how to merge them and reduce my data
 
 
4 hours later…
10:25 PM
Hey guys, I'm trying to unravel the shape of an array, but i do not really know what I should google ... I'm trying to create an tensorflow placeholder with size [None, (shape of input data)], but I don't know how to split the tuple without explicitly knowing the dimension of it
nevermind, found the solution,sorry for the distraction
 

« first day (2960 days earlier)      last day (1989 days later) »