workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
is the logic that creates the cursor `c` called each time the script runs?
2017-07-27T20:59:29.488097
Marcie
pythondev_help_Marcie_2017-07-27T20:59:29.488097
1,501,189,169.488097
87,703
pythondev
help
db = sqlite3.connect(‘…’) c = db.cursor()
2017-07-27T21:00:59.508413
Graciela
pythondev_help_Graciela_2017-07-27T21:00:59.508413
1,501,189,259.508413
87,704
pythondev
help
db and c are created once at the start of main.py
2017-07-27T21:01:09.510811
Graciela
pythondev_help_Graciela_2017-07-27T21:01:09.510811
1,501,189,269.510811
87,705
pythondev
help
<@Graciela> try putting your `db` and `c` creation inside the `today_posts` method
2017-07-27T21:39:28.971645
Marcie
pythondev_help_Marcie_2017-07-27T21:39:28.971645
1,501,191,568.971645
87,706
pythondev
help
hi all, I am new (new to this slack and new to python) and have a question that is driving me crazy. could someone help?
2017-07-27T23:28:49.151640
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:28:49.151640
1,501,198,129.15164
87,707
pythondev
help
Welcome <@Wendolyn> ! Go ahead and ask, someone will be along to help as they're available (no need to ask to ask)
2017-07-27T23:29:57.162557
Beula
pythondev_help_Beula_2017-07-27T23:29:57.162557
1,501,198,197.162557
87,708
pythondev
help
the short story is that I'm getting `[Errno 32] Broken pipe` and I tried to use this solution I found on stack overflow ```from signal import signal, SIGPIPE, SIG_DFL signal(SIGPIPE,SIG_DFL) ``` but just as was warned in the comments, that made the error go away, but my service just shut down instead
2017-07-27T23:30:58.172943
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:30:58.172943
1,501,198,258.172943
87,709
pythondev
help
what I'm doing is this...I have two services, a main service for a website and a service for an api. My api gets some data from somewhere else and sends it to my website upon request.
2017-07-27T23:32:07.184190
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:32:07.184190
1,501,198,327.18419
87,710
pythondev
help
when I hit the api directly, like through a valid route, I get the data and no error
2017-07-27T23:32:37.188972
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:32:37.188972
1,501,198,357.188972
87,711
pythondev
help
but when I go through my website, which will eventually generate the same url and send a request to my api, I get a broken pipe.
2017-07-27T23:33:28.196889
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:33:28.196889
1,501,198,408.196889
87,712
pythondev
help
both of the services are running on my computer
2017-07-27T23:33:41.198773
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:33:41.198773
1,501,198,421.198773
87,713
pythondev
help
when I use the deployed version of the website (AWS), I get no error
2017-07-27T23:34:24.205332
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:34:24.205332
1,501,198,464.205332
87,714
pythondev
help
only get broken pipe locally
2017-07-27T23:34:33.206675
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:34:33.206675
1,501,198,473.206675
87,715
pythondev
help
Can you produce a minimum viable example? Say just the two services running and the web one asking from the service one and failing? Abstractly it sounds like the web process is closing the socket - but hard to know
2017-07-27T23:35:36.217419
Beula
pythondev_help_Beula_2017-07-27T23:35:36.217419
1,501,198,536.217419
87,716
pythondev
help
ok...give me a minute to come up with an example, its actually pretty complicated. but I'll try to strip it down the the most important parts
2017-07-27T23:39:24.253355
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:39:24.253355
1,501,198,764.253355
87,717
pythondev
help
None
2017-07-27T23:42:46.285566
Tammi
pythondev_help_Tammi_2017-07-27T23:42:46.285566
1,501,198,966.285566
87,718
pythondev
help
I'm having a hard time distilling this into a code example. Maybe it would help me to just talk about it abstractly. If you don't mind? For one, what is a socket, and what would cause it to close/how could I keep it open? I have a feeling that this is the problem
2017-07-27T23:50:57.363211
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:50:57.363211
1,501,199,457.363211
87,719
pythondev
help
Thank you for your help
2017-07-27T23:51:21.367026
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:51:21.367026
1,501,199,481.367026
87,720
pythondev
help
reading about sockets here <https://www.tutorialspoint.com/python/python_networking.htm> right now. if you know of any good resources off the top of your head I would love to have them
2017-07-27T23:55:01.402295
Wendolyn
pythondev_help_Wendolyn_2017-07-27T23:55:01.402295
1,501,199,701.402295
87,721
pythondev
help
Sorry it's late my time, so I may be out shortly. I'm hoping someone else familiar with the architecture comes in to help too
2017-07-28T00:14:06.593470
Beula
pythondev_help_Beula_2017-07-28T00:14:06.593470
1,501,200,846.59347
87,722
pythondev
help
I understand, thanks anyway
2017-07-28T00:21:28.664289
Wendolyn
pythondev_help_Wendolyn_2017-07-28T00:21:28.664289
1,501,201,288.664289
87,723
pythondev
help
hello people ..
2017-07-28T02:06:48.687706
Latrina
pythondev_help_Latrina_2017-07-28T02:06:48.687706
1,501,207,608.687706
87,724
pythondev
help
<@Latrina> if you don't see answers here, in the future use the channel dedicated to your topic (<#C0LMFRMB5|django> or <#C0W0D17MJ|django_learning> ) No need to move, but it's generally best to scope questions
2017-07-28T02:11:28.740226
Beula
pythondev_help_Beula_2017-07-28T02:11:28.740226
1,501,207,888.740226
87,725
pythondev
help
thanks <@Beula> . I surely will ask them in these dedicated channes.
2017-07-28T02:12:35.753312
Latrina
pythondev_help_Latrina_2017-07-28T02:12:35.753312
1,501,207,955.753312
87,726
pythondev
help
No worries :slightly_smiling_face:
2017-07-28T02:14:45.777497
Beula
pythondev_help_Beula_2017-07-28T02:14:45.777497
1,501,208,085.777497
87,727
pythondev
help
<@Latrina> did you follow the example from the docs (<https://docs.djangoproject.com/en/1.11/topics/db/examples/one_to_one/#>)
2017-07-28T02:16:15.795191
Beula
pythondev_help_Beula_2017-07-28T02:16:15.795191
1,501,208,175.795191
87,728
pythondev
help
Basically: ``` &gt;&gt;&gt; r = Restaurant(place=p1, serves_hot_dogs=True, serves_pizza=False) &gt;&gt;&gt; r.save() ``` Where `p1` is the instance of the "model which is already saved"
2017-07-28T02:16:48.801522
Beula
pythondev_help_Beula_2017-07-28T02:16:48.801522
1,501,208,208.801522
87,729
pythondev
help
<@Beula> i am going to try this and see if that works .. thanks again .I'll update here once i am done
2017-07-28T02:19:31.832049
Latrina
pythondev_help_Latrina_2017-07-28T02:19:31.832049
1,501,208,371.832049
87,730
pythondev
help
I see in a lot of stackoverflow questions and blog posts that to change the default admin UI, you have to change things in the directory ./templates/admin. in 1.11 that doesn't seem to exist... What'the updated way to change the admin template? In particular, to either change the /change/ url or to disable editing after initial creation.
2017-07-28T05:17:11.944647
Gregory
pythondev_help_Gregory_2017-07-28T05:17:11.944647
1,501,219,031.944647
87,731
pythondev
help
I just don't see a `templates` directory at all...
2017-07-28T05:20:09.006651
Gregory
pythondev_help_Gregory_2017-07-28T05:20:09.006651
1,501,219,209.006651
87,732
pythondev
help
<https://docs.djangoproject.com/en/1.11/ref/contrib/admin/#overriding-admin-templates>
2017-07-28T06:16:32.165562
Meg
pythondev_help_Meg_2017-07-28T06:16:32.165562
1,501,222,592.165562
87,733
pythondev
help
&gt; The required arguments are an RFC 822 from-address string, a list of RFC 822 to-address strings (a bare string will be treated as a list with 1 address), and a message string.
2017-07-28T09:14:05.561367
Suellen
pythondev_help_Suellen_2017-07-28T09:14:05.561367
1,501,233,245.561367
87,734
pythondev
help
sendmail's "signature" is something like: `def sendmail(from_addr: str, to_addrs: list, msg: str):`
2017-07-28T09:15:23.596988
Suellen
pythondev_help_Suellen_2017-07-28T09:15:23.596988
1,501,233,323.596988
87,735
pythondev
help
```#Change recipients string to list. to = [to]```
2017-07-28T09:15:46.607912
Suellen
pythondev_help_Suellen_2017-07-28T09:15:46.607912
1,501,233,346.607912
87,736
pythondev
help
you should transform your string of emails ('<mailto:[email protected]|[email protected]>, <http://email2.mail.com|email2.mail.com>'), so that it becomes a list with each element being a proper email address
2017-07-28T09:16:44.634656
Suellen
pythondev_help_Suellen_2017-07-28T09:16:44.634656
1,501,233,404.634656
87,737
pythondev
help
So instead of reassigning to a list, perform a split? Like this: ``` #Change recipients string to list. to = to.split(',') ```
2017-07-28T09:19:15.703550
Johnetta
pythondev_help_Johnetta_2017-07-28T09:19:15.703550
1,501,233,555.70355
87,738
pythondev
help
yes, that's it :slightly_smiling_face:
2017-07-28T09:19:40.715177
Suellen
pythondev_help_Suellen_2017-07-28T09:19:40.715177
1,501,233,580.715177
87,739
pythondev
help
Which would still allow for cc and bcc to be added
2017-07-28T09:19:41.715670
Johnetta
pythondev_help_Johnetta_2017-07-28T09:19:41.715670
1,501,233,581.71567
87,740
pythondev
help
Cool! I'll try that out.
2017-07-28T09:19:48.719098
Johnetta
pythondev_help_Johnetta_2017-07-28T09:19:48.719098
1,501,233,588.719098
87,741
pythondev
help
I'd also `strip` them of whitespace, otherwise that leading space will become a part of one email address, and I'm not sure if `sendmail` handles that
2017-07-28T09:20:23.735700
Suellen
pythondev_help_Suellen_2017-07-28T09:20:23.735700
1,501,233,623.7357
87,742
pythondev
help
better safe than sorry
2017-07-28T09:20:30.739033
Suellen
pythondev_help_Suellen_2017-07-28T09:20:30.739033
1,501,233,630.739033
87,743
pythondev
help
Ahh good point
2017-07-28T09:24:31.855643
Johnetta
pythondev_help_Johnetta_2017-07-28T09:24:31.855643
1,501,233,871.855643
87,744
pythondev
help
hi guys. anyone here know any solutions to having a python script create a list of objects parallel to another script consuming those objects as they are created?
2017-07-28T09:39:06.293500
Ray
pythondev_help_Ray_2017-07-28T09:39:06.293500
1,501,234,746.2935
87,745
pythondev
help
i’ve got some test automation where each test requires a brand new account, but the accounts take anywhere between 30s-2min to create. i’d like to create the accounts parallel to the tests running to speed up execution time. i’ve found a way using `multiprocessing.Process` and continuously adding accounts to a `multiprocessing.Queue`, but this only works if that process is started from within the same script that executes the tests. i have a use case that requires the test execution to be able to consume a pre-made account as soon as the test starts executing, so `multiprocessing.Process` does not fully solve my problem, since the first test to execute still has to wait for the first account to be created and added to the queue
2017-07-28T09:45:22.491930
Ray
pythondev_help_Ray_2017-07-28T09:45:22.491930
1,501,235,122.49193
87,746
pythondev
help
what would be ideal is a way to create a queue of accounts from a `create_accounts.py` script that i can execute at any time, and then be able to consume that queue at any arbitrary point in time _during_ or _after_ `create_accounts.py`
2017-07-28T09:48:11.579488
Ray
pythondev_help_Ray_2017-07-28T09:48:11.579488
1,501,235,291.579488
87,747
pythondev
help
an account takes up to two minutes to create?
2017-07-28T09:50:12.642411
Meg
pythondev_help_Meg_2017-07-28T09:50:12.642411
1,501,235,412.642411
87,748
pythondev
help
:open_mouth:
2017-07-28T09:50:20.646906
Meg
pythondev_help_Meg_2017-07-28T09:50:20.646906
1,501,235,420.646906
87,749
pythondev
help
no chance you can spend time trying to optimize that process?
2017-07-28T09:50:36.655169
Meg
pythondev_help_Meg_2017-07-28T09:50:36.655169
1,501,235,436.655169
87,750
pythondev
help
<@Suellen> That worked perfectly, thank you for the help! ``` #Change recipients string to list and strip whitespace. to = [x.strip() for x in to.split(',')] ```
2017-07-28T10:15:03.492713
Johnetta
pythondev_help_Johnetta_2017-07-28T10:15:03.492713
1,501,236,903.492713
87,751
pythondev
help
:slightly_smiling_face: I'm glad
2017-07-28T10:15:20.503325
Suellen
pythondev_help_Suellen_2017-07-28T10:15:20.503325
1,501,236,920.503325
87,752
pythondev
help
<@Ray> I wrote a service at a job with similar issues, it basically kept a fresh list of users at all times and tests could "check one out", later the service would clean them up
2017-07-28T10:19:33.648591
Beula
pythondev_help_Beula_2017-07-28T10:19:33.648591
1,501,237,173.648591
87,753
pythondev
help
Anyone here who has used `ttk.progressbar`
2017-07-28T10:25:14.846270
Myong
pythondev_help_Myong_2017-07-28T10:25:14.846270
1,501,237,514.84627
87,754
pythondev
help
If I never have to use tkinter in my life again then it's a good day
2017-07-28T11:39:58.538475
Myong
pythondev_help_Myong_2017-07-28T11:39:58.538475
1,501,241,998.538475
87,755
pythondev
help
This is why electron is so popular :(
2017-07-28T11:40:33.559933
Beula
pythondev_help_Beula_2017-07-28T11:40:33.559933
1,501,242,033.559933
87,756
pythondev
help
Why did no one tell me of these other beautiful things
2017-07-28T11:41:01.576781
Myong
pythondev_help_Myong_2017-07-28T11:41:01.576781
1,501,242,061.576781
87,757
pythondev
help
Attempting to run this damn progress bar is gonna be the end of me
2017-07-28T11:41:19.587234
Myong
pythondev_help_Myong_2017-07-28T11:41:19.587234
1,501,242,079.587234
87,758
pythondev
help
honestly I'm just gonna say screw it and just click a button and you have to wait
2017-07-28T11:41:32.595450
Myong
pythondev_help_Myong_2017-07-28T11:41:32.595450
1,501,242,092.59545
87,759
pythondev
help
What's the app do?
2017-07-28T11:41:47.604046
Beula
pythondev_help_Beula_2017-07-28T11:41:47.604046
1,501,242,107.604046
87,760
pythondev
help
tkinter is the mistake here :smile:
2017-07-28T11:41:51.606699
Denna
pythondev_help_Denna_2017-07-28T11:41:51.606699
1,501,242,111.606699
87,761
pythondev
help
Just generates a report
2017-07-28T11:41:53.607332
Myong
pythondev_help_Myong_2017-07-28T11:41:53.607332
1,501,242,113.607332
87,762
pythondev
help
<@Meg> I would love to optimize the that process, but we’re working with a huge legacy app and optimizing the app itself is not really a feasible option without reliable (and efficient) test automation :disappointed:
2017-07-28T11:41:55.609084
Ray
pythondev_help_Ray_2017-07-28T11:41:55.609084
1,501,242,115.609084
87,763
pythondev
help
I'd it's internal, bad ux for a little is okay
2017-07-28T11:42:12.618604
Beula
pythondev_help_Beula_2017-07-28T11:42:12.618604
1,501,242,132.618604
87,764
pythondev
help
I'm gonna just create another root and make a popup that comes up when the requests to the server complete
2017-07-28T11:42:17.621852
Myong
pythondev_help_Myong_2017-07-28T11:42:17.621852
1,501,242,137.621852
87,765
pythondev
help
It is
2017-07-28T11:42:19.623189
Myong
pythondev_help_Myong_2017-07-28T11:42:19.623189
1,501,242,139.623189
87,766
pythondev
help
it looks horrible
2017-07-28T11:42:22.624787
Myong
pythondev_help_Myong_2017-07-28T11:42:22.624787
1,501,242,142.624787
87,767
pythondev
help
<@Beula> that sounds like what i’m looking for. how did you go about that?
2017-07-28T11:42:43.637309
Ray
pythondev_help_Ray_2017-07-28T11:42:43.637309
1,501,242,163.637309
87,768
pythondev
help
<@Ray> makes sense, gotta work with what you have.
2017-07-28T11:43:02.648476
Meg
pythondev_help_Meg_2017-07-28T11:43:02.648476
1,501,242,182.648476
87,769
pythondev
help
exactly
2017-07-28T11:43:29.664527
Ray
pythondev_help_Ray_2017-07-28T11:43:29.664527
1,501,242,209.664527
87,770
pythondev
help
It was just a webapp, it would have a pool size of users it had to maintain, each time a test asked for a user I'd mark them as checked out and add them to a cleanup queue. That had a default time to live, but a test could ask for longer.
2017-07-28T11:45:25.734027
Beula
pythondev_help_Beula_2017-07-28T11:45:25.734027
1,501,242,325.734027
87,771
pythondev
help
Then the test could edit the user if they wanted, add roles, etc
2017-07-28T11:45:43.744235
Beula
pythondev_help_Beula_2017-07-28T11:45:43.744235
1,501,242,343.744235
87,772
pythondev
help
Our tests ran constantly and tons of them, so this was a Go application due to the load
2017-07-28T11:46:19.765701
Beula
pythondev_help_Beula_2017-07-28T11:46:19.765701
1,501,242,379.765701
87,773
pythondev
help
but not create user?
2017-07-28T11:47:06.794213
Meg
pythondev_help_Meg_2017-07-28T11:47:06.794213
1,501,242,426.794213
87,774
pythondev
help
What?
2017-07-28T11:48:45.851498
Beula
pythondev_help_Beula_2017-07-28T11:48:45.851498
1,501,242,525.851498
87,775
pythondev
help
ah ok
2017-07-28T11:50:10.900937
Ray
pythondev_help_Ray_2017-07-28T11:50:10.900937
1,501,242,610.900937
87,776
pythondev
help
It's not ideal to depend on an external service for tests, this was for the staging env
2017-07-28T11:51:20.941785
Beula
pythondev_help_Beula_2017-07-28T11:51:20.941785
1,501,242,680.941785
87,777
pythondev
help
agreed. this is also for our staging env
2017-07-28T11:51:41.953967
Ray
pythondev_help_Ray_2017-07-28T11:51:41.953967
1,501,242,701.953967
87,778
pythondev
help
i don’t envision the service being used outside of the tests, but i do need it to be able to be run independently of running the tests themselves
2017-07-28T11:53:04.002099
Ray
pythondev_help_Ray_2017-07-28T11:53:04.002099
1,501,242,784.002099
87,779
pythondev
help
I ended up getting an offer to move to Dev after that
2017-07-28T11:53:29.017174
Beula
pythondev_help_Beula_2017-07-28T11:53:29.017174
1,501,242,809.017174
87,780
pythondev
help
oh yeah?
2017-07-28T11:53:41.024613
Ray
pythondev_help_Ray_2017-07-28T11:53:41.024613
1,501,242,821.024613
87,781
pythondev
help
nice
2017-07-28T11:53:42.025140
Ray
pythondev_help_Ray_2017-07-28T11:53:42.025140
1,501,242,822.02514
87,782
pythondev
help
we’re a mostly php shop, but atm all our test automation is in python, for whatever reason (not that i’m complaining. i like python better :smile:)
2017-07-28T11:54:19.046912
Ray
pythondev_help_Ray_2017-07-28T11:54:19.046912
1,501,242,859.046912
87,783
pythondev
help
I've considered going back to qa to be able to do Python full time again
2017-07-28T11:54:51.065911
Beula
pythondev_help_Beula_2017-07-28T11:54:51.065911
1,501,242,891.065911
87,784
pythondev
help
I've seen lots of "QA Architect" jobs around
2017-07-28T11:55:16.080893
Beula
pythondev_help_Beula_2017-07-28T11:55:16.080893
1,501,242,916.080893
87,785
pythondev
help
<@Beula> looks like `pyinstaller` doesn't work with Py3.6
2017-07-28T12:35:28.403995
Myong
pythondev_help_Myong_2017-07-28T12:35:28.403995
1,501,245,328.403995
87,786
pythondev
help
Sadly true
2017-07-28T12:35:35.407491
Beula
pythondev_help_Beula_2017-07-28T12:35:35.407491
1,501,245,335.407491
87,787
pythondev
help
do you have any other recommendation?
2017-07-28T12:35:41.410444
Myong
pythondev_help_Myong_2017-07-28T12:35:41.410444
1,501,245,341.410444
87,788
pythondev
help
Are you using any 3.6 features?
2017-07-28T12:35:51.415709
Beula
pythondev_help_Beula_2017-07-28T12:35:51.415709
1,501,245,351.415709
87,789
pythondev
help
That's what I was gonna figure out
2017-07-28T12:36:00.420557
Myong
pythondev_help_Myong_2017-07-28T12:36:00.420557
1,501,245,360.420557
87,790
pythondev
help
I will say no
2017-07-28T12:36:03.422002
Myong
pythondev_help_Myong_2017-07-28T12:36:03.422002
1,501,245,363.422002
87,791
pythondev
help
because I probably am not
2017-07-28T12:36:07.423833
Myong
pythondev_help_Myong_2017-07-28T12:36:07.423833
1,501,245,367.423833
87,792
pythondev
help
is is good with `3.5.x`?
2017-07-28T12:36:30.436102
Myong
pythondev_help_Myong_2017-07-28T12:36:30.436102
1,501,245,390.436102
87,793
pythondev
help
Yeah, I have used it with 3.5 for about a year
2017-07-28T12:37:59.481078
Beula
pythondev_help_Beula_2017-07-28T12:37:59.481078
1,501,245,479.481078
87,794
pythondev
help
It works!! For some reason os.remove(item) is giving me error saying it's used by another process but I just have to delete the files. Thank you so much!
2017-07-28T12:59:57.166669
Jed
pythondev_help_Jed_2017-07-28T12:59:57.166669
1,501,246,797.166669
87,795
pythondev
help
<@Myong> why not `pyenv`?
2017-07-28T13:01:30.219358
Signe
pythondev_help_Signe_2017-07-28T13:01:30.219358
1,501,246,890.219358
87,796
pythondev
help
I believe what he is doing is trying to create a single executable to distrubute
2017-07-28T13:02:13.242480
Beula
pythondev_help_Beula_2017-07-28T13:02:13.242480
1,501,246,933.24248
87,797
pythondev
help
oh.. right &gt;.&lt;
2017-07-28T13:02:35.254358
Signe
pythondev_help_Signe_2017-07-28T13:02:35.254358
1,501,246,955.254358
87,798
pythondev
help
ignore me...
2017-07-28T13:02:37.255758
Signe
pythondev_help_Signe_2017-07-28T13:02:37.255758
1,501,246,957.255758
87,799
pythondev
help
But do use `pyenv` to handle multiple versions!
2017-07-28T13:04:50.324431
Beula
pythondev_help_Beula_2017-07-28T13:04:50.324431
1,501,247,090.324431
87,800
pythondev
help
Brew has caused me a number of issues when it updates
2017-07-28T13:05:01.330634
Beula
pythondev_help_Beula_2017-07-28T13:05:01.330634
1,501,247,101.330634
87,801
pythondev
help
Unfortunately my time is up here next Friday so after that it's their issue :joy:
2017-07-28T13:05:45.353035
Myong
pythondev_help_Myong_2017-07-28T13:05:45.353035
1,501,247,145.353035
87,802