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
Ideally a user uploads a CSV or places it in a specific directory, then can hit a button that will cause the script to run
2017-11-10T09:17:21.000066
Blanche
pythondev_help_Blanche_2017-11-10T09:17:21.000066
1,510,305,441.000066
100,003
pythondev
help
anyone here savvy with numpy? I have a binary file with a particular block size, but I only want to read certain fields out of it, how do I tell it the size of the blocks if I am not reading every byte of it?
2017-11-10T11:31:44.000544
Sirena
pythondev_help_Sirena_2017-11-10T11:31:44.000544
1,510,313,504.000544
100,004
pythondev
help
<@Sirena> I don't know if this is useful for you? <https://stackoverflow.com/questions/38806285/using-numpy-fromfile-to-read-scattered-binary-data>
2017-11-10T11:49:30.000822
Fabiola
pythondev_help_Fabiola_2017-11-10T11:49:30.000822
1,510,314,570.000822
100,005
pythondev
help
that's useful, although not the same situation I have. I think I just need to stick a useless variable at the end of my dtype, so I added ('trash', np.void, blksize) and the size of my blocks seems right now
2017-11-10T11:56:01.000050
Sirena
pythondev_help_Sirena_2017-11-10T11:56:01.000050
1,510,314,961.00005
100,006
pythondev
help
thanks <@Fabiola>
2017-11-10T11:56:16.000631
Sirena
pythondev_help_Sirena_2017-11-10T11:56:16.000631
1,510,314,976.000631
100,007
pythondev
help
hey I need a bit of help understanding why my code isnt executing how I expected. ```python reg = Auth() device = Device() d_name = device.generate_name() d_pass = device.generate_password(20) print(reg.register(d_name, d_pass, device.config.read('SECRET_KEY'))) ```
2017-11-10T12:48:13.000238
Janella
pythondev_help_Janella_2017-11-10T12:48:13.000238
1,510,318,093.000238
100,008
pythondev
help
the register function executes before the generate functions are done doing what they need to do
2017-11-10T12:48:36.000598
Janella
pythondev_help_Janella_2017-11-10T12:48:36.000598
1,510,318,116.000598
100,009
pythondev
help
sorry when its like this ```print(reg.register(device.config.read('NAME'), device.config.read('PASSWORD'), device.config.read('SECRET_KEY')))```
2017-11-10T12:57:11.000379
Janella
pythondev_help_Janella_2017-11-10T12:57:11.000379
1,510,318,631.000379
100,010
pythondev
help
I've been wokring on this all day and cant figure out why it behaves this way
2017-11-10T13:02:46.000243
Janella
pythondev_help_Janella_2017-11-10T13:02:46.000243
1,510,318,966.000243
100,011
pythondev
help
For context, what libraries are Auth() and Device() coming from?
2017-11-10T13:07:05.000377
Antionette
pythondev_help_Antionette_2017-11-10T13:07:05.000377
1,510,319,225.000377
100,012
pythondev
help
they're classes I wrote
2017-11-10T13:08:23.000360
Janella
pythondev_help_Janella_2017-11-10T13:08:23.000360
1,510,319,303.00036
100,013
pythondev
help
the auth class has some post and get methods
2017-11-10T13:08:54.000030
Janella
pythondev_help_Janella_2017-11-10T13:08:54.000030
1,510,319,334.00003
100,014
pythondev
help
and the device class writes to a config file locally. I can upload a code snippet if it helps
2017-11-10T13:09:39.000096
Janella
pythondev_help_Janella_2017-11-10T13:09:39.000096
1,510,319,379.000096
100,015
pythondev
help
are the name and password generators asynchronous?
2017-11-10T13:11:23.000364
Meg
pythondev_help_Meg_2017-11-10T13:11:23.000364
1,510,319,483.000364
100,016
pythondev
help
I don't think. they are pretty simple loops
2017-11-10T13:12:29.000557
Janella
pythondev_help_Janella_2017-11-10T13:12:29.000557
1,510,319,549.000557
100,017
pythondev
help
I'm very much a noob python programmer. So some of the stuff im doing might not make too much snese in the python world
2017-11-10T13:14:23.000156
Janella
pythondev_help_Janella_2017-11-10T13:14:23.000156
1,510,319,663.000156
100,018
pythondev
help
alright.
2017-11-10T13:18:40.000517
Meg
pythondev_help_Meg_2017-11-10T13:18:40.000517
1,510,319,920.000517
100,019
pythondev
help
nothing pops out at me
2017-11-10T13:18:45.000162
Meg
pythondev_help_Meg_2017-11-10T13:18:45.000162
1,510,319,925.000162
100,020
pythondev
help
what I would do is add more print lines or logging statements in `Config.read`, and `Auth.register`
2017-11-10T13:19:17.000048
Meg
pythondev_help_Meg_2017-11-10T13:19:17.000048
1,510,319,957.000048
100,021
pythondev
help
I agree with dd82. Add print lines between each func call, just too see what's happening
2017-11-10T13:20:25.000253
Fabiola
pythondev_help_Fabiola_2017-11-10T13:20:25.000253
1,510,320,025.000253
100,022
pythondev
help
what it seems to me is you’re including the configuration read ops as part of the authentication call
2017-11-10T13:20:31.000438
Meg
pythondev_help_Meg_2017-11-10T13:20:31.000438
1,510,320,031.000438
100,023
pythondev
help
I wonder if this has the same effect: ``` username = device.config.read('NAME') password = device.config.read('PASSWORD') key = device.config.read('SECRET_KEY') registration = reg.register(username, password, key) print(registration) ```
2017-11-10T13:21:52.000383
Meg
pythondev_help_Meg_2017-11-10T13:21:52.000383
1,510,320,112.000383
100,024
pythondev
help
I'll give it a try. when I run the code in through the debugger and step throught it, it runs fine. I'll add some prints and see what happens
2017-11-10T13:22:09.000132
Janella
pythondev_help_Janella_2017-11-10T13:22:09.000132
1,510,320,129.000132
100,025
pythondev
help
how are you executing it when the errors happen?
2017-11-10T13:22:29.000033
Meg
pythondev_help_Meg_2017-11-10T13:22:29.000033
1,510,320,149.000033
100,026
pythondev
help
python script_name.py in the console
2017-11-10T13:23:04.000020
Janella
pythondev_help_Janella_2017-11-10T13:23:04.000020
1,510,320,184.00002
100,027
pythondev
help
hmm, ok
2017-11-10T13:23:21.000265
Meg
pythondev_help_Meg_2017-11-10T13:23:21.000265
1,510,320,201.000265
100,028
pythondev
help
its like theres some async operation
2017-11-10T13:25:03.000256
Janella
pythondev_help_Janella_2017-11-10T13:25:03.000256
1,510,320,303.000256
100,029
pythondev
help
``` username = device.config.read('NAME') password = device.config.read('PASSWORD') key = device.config.read('SECRET_KEY') registration = reg.register(username, password, key) ```
2017-11-10T13:25:41.000385
Janella
pythondev_help_Janella_2017-11-10T13:25:41.000385
1,510,320,341.000385
100,030
pythondev
help
like that it works
2017-11-10T13:25:50.000009
Janella
pythondev_help_Janella_2017-11-10T13:25:50.000009
1,510,320,350.000009
100,031
pythondev
help
w/e I'll stick with it.
2017-11-10T13:26:33.000208
Janella
pythondev_help_Janella_2017-11-10T13:26:33.000208
1,510,320,393.000208
100,032
pythondev
help
hmm
2017-11-10T13:37:19.000641
Meg
pythondev_help_Meg_2017-11-10T13:37:19.000641
1,510,321,039.000641
100,033
pythondev
help
so, what I suspect is the root cause is calling `reg.register()` in a `print` method
2017-11-10T13:37:36.000218
Meg
pythondev_help_Meg_2017-11-10T13:37:36.000218
1,510,321,056.000218
100,034
pythondev
help
because as the documentation says &gt;All non-keyword arguments are converted to strings like str() does <https://docs.python.org/3/library/functions.html#print>
2017-11-10T13:40:18.000209
Meg
pythondev_help_Meg_2017-11-10T13:40:18.000209
1,510,321,218.000209
100,035
pythondev
help
so what I suspect is the `str()` call is evaluating `reg.register()` first, before the actual arguments are evaluated
2017-11-10T13:40:58.000205
Meg
pythondev_help_Meg_2017-11-10T13:40:58.000205
1,510,321,258.000205
100,036
pythondev
help
ohh i see.
2017-11-10T13:55:49.000249
Janella
pythondev_help_Janella_2017-11-10T13:55:49.000249
1,510,322,149.000249
100,037
pythondev
help
I'll keep that in mind going forward
2017-11-10T13:56:05.000511
Janella
pythondev_help_Janella_2017-11-10T13:56:05.000511
1,510,322,165.000511
100,038
pythondev
help
Is it printing anything from the statement on line 12?
2017-11-10T17:39:20.000178
Antionette
pythondev_help_Antionette_2017-11-10T17:39:20.000178
1,510,335,560.000178
100,039
pythondev
help
But you probably would need to do `len(d.entries)` instead of just `len(d)`. However the more "pythonic" way would be to just iterate through the links instead of indexing
2017-11-10T17:41:43.000206
Antionette
pythondev_help_Antionette_2017-11-10T17:41:43.000206
1,510,335,703.000206
100,040
pythondev
help
like `for entry in d.entries`
2017-11-10T17:41:58.000102
Antionette
pythondev_help_Antionette_2017-11-10T17:41:58.000102
1,510,335,718.000102
100,041
pythondev
help
It's not printing anything from either print statement, but it was working prior to wrapping it in a function
2017-11-10T17:47:21.000271
Enid
pythondev_help_Enid_2017-11-10T17:47:21.000271
1,510,336,041.000271
100,042
pythondev
help
Did you double check the length of `d`?
2017-11-10T17:48:11.000108
Antionette
pythondev_help_Antionette_2017-11-10T17:48:11.000108
1,510,336,091.000108
100,043
pythondev
help
I just changed that to "for entry in d.entries" and it still doesn't print anything.
2017-11-10T17:49:03.000015
Enid
pythondev_help_Enid_2017-11-10T17:49:03.000015
1,510,336,143.000015
100,044
pythondev
help
Hmmm if you print d.entries before line 9 what is in it?
2017-11-10T17:49:48.000184
Antionette
pythondev_help_Antionette_2017-11-10T17:49:48.000184
1,510,336,188.000184
100,045
pythondev
help
Unfortunately I'm not familiar with the library if that's the issue but assuming that `d.entries` is enumerable and contains some elements then print statement inside the loop should be executing
2017-11-10T17:50:59.000129
Antionette
pythondev_help_Antionette_2017-11-10T17:50:59.000129
1,510,336,259.000129
100,046
pythondev
help
So just try iterating over d directly instead of entries?
2017-11-10T17:53:02.000021
Antionette
pythondev_help_Antionette_2017-11-10T17:53:02.000021
1,510,336,382.000021
100,047
pythondev
help
I will try that
2017-11-10T17:53:10.000073
Enid
pythondev_help_Enid_2017-11-10T17:53:10.000073
1,510,336,390.000073
100,048
pythondev
help
Tried it, didn't change it. At this point I'm just gonna say screw it and write all of the loops to append to my URL list (since I have 4 RSS feed URLs) instead of doing it the 'right' way and using a function.
2017-11-10T17:55:46.000040
Enid
pythondev_help_Enid_2017-11-10T17:55:46.000040
1,510,336,546.00004
100,049
pythondev
help
Thank you for your help.
2017-11-10T17:56:24.000101
Enid
pythondev_help_Enid_2017-11-10T17:56:24.000101
1,510,336,584.000101
100,050
pythondev
help
So, at work we have a lot of apps/services each with their own `.env` files, a few repos have multiple. So naturally some of them have the same env variables. Which, can get convoluted. We use salt to set all the ENV's when deploying on production/staging but locally, its kind of a mess. What do you guys use, if any,...
2017-11-10T18:28:53.000035
Bruno
pythondev_help_Bruno_2017-11-10T18:28:53.000035
1,510,338,533.000035
100,051
pythondev
help
those getting mixed up seem to be a reason some people have issues running some of the apps locally rather than using staging
2017-11-10T18:29:20.000162
Bruno
pythondev_help_Bruno_2017-11-10T18:29:20.000162
1,510,338,560.000162
100,052
pythondev
help
any idea how to solve this
2017-11-11T06:48:26.000084
Georgetta
pythondev_help_Georgetta_2017-11-11T06:48:26.000084
1,510,382,906.000084
100,053
pythondev
help
ValueError: dictionary update sequence element #0 has length 0; 2 is required
2017-11-11T06:48:28.000002
Georgetta
pythondev_help_Georgetta_2017-11-11T06:48:28.000002
1,510,382,908.000002
100,054
pythondev
help
sounds like whatever you’re trying to put in template context is an empty dict or invalid type
2017-11-11T07:12:20.000073
Meg
pythondev_help_Meg_2017-11-11T07:12:20.000073
1,510,384,340.000073
100,055
pythondev
help
other than that, you’ve not given any kind of information to go on
2017-11-11T07:12:33.000039
Meg
pythondev_help_Meg_2017-11-11T07:12:33.000039
1,510,384,353.000039
100,056
pythondev
help
I added the trace
2017-11-11T07:13:00.000070
Georgetta
pythondev_help_Georgetta_2017-11-11T07:13:00.000070
1,510,384,380.00007
100,057
pythondev
help
Before this works perfectly, but today i get this. I dont know why, this only the login page
2017-11-11T07:13:52.000059
Georgetta
pythondev_help_Georgetta_2017-11-11T07:13:52.000059
1,510,384,432.000059
100,058
pythondev
help
trace is good, but doesn’t show the code block of what you wrote that causes it
2017-11-11T07:14:18.000068
Meg
pythondev_help_Meg_2017-11-11T07:14:18.000068
1,510,384,458.000068
100,059
pythondev
help
plus, what do you get when you google the error message
2017-11-11T07:14:28.000072
Meg
pythondev_help_Meg_2017-11-11T07:14:28.000072
1,510,384,468.000072
100,060
pythondev
help
Thats all i get, when i google it i find case but they have problems with their context
2017-11-11T07:15:37.000012
Georgetta
pythondev_help_Georgetta_2017-11-11T07:15:37.000012
1,510,384,537.000012
100,061
pythondev
help
I dont have any context
2017-11-11T07:15:46.000059
Georgetta
pythondev_help_Georgetta_2017-11-11T07:15:46.000059
1,510,384,546.000059
100,062
pythondev
help
A bit of context: a dictionary can be created from an iterable containing _pairs_ of values. Like `[(0, 1), (2, 3), (3, 4)]`. You provided an iterable that has an empty tuple or something like that. Something is empty that shouldn't be.
2017-11-11T07:17:26.000009
Suellen
pythondev_help_Suellen_2017-11-11T07:17:26.000009
1,510,384,646.000009
100,063
pythondev
help
So inspect what you're putting there
2017-11-11T07:17:33.000087
Suellen
pythondev_help_Suellen_2017-11-11T07:17:33.000087
1,510,384,653.000087
100,064
pythondev
help
wait, the error is completely inside Django
2017-11-11T07:18:17.000068
Suellen
pythondev_help_Suellen_2017-11-11T07:18:17.000068
1,510,384,697.000068
100,065
pythondev
help
lol
2017-11-11T07:18:19.000052
Suellen
pythondev_help_Suellen_2017-11-11T07:18:19.000052
1,510,384,699.000052
100,066
pythondev
help
how are you calling the render?
2017-11-11T07:18:30.000067
Meg
pythondev_help_Meg_2017-11-11T07:18:30.000067
1,510,384,710.000067
100,067
pythondev
help
return render ( request, 'accounts/login.html')
2017-11-11T07:20:25.000033
Georgetta
pythondev_help_Georgetta_2017-11-11T07:20:25.000033
1,510,384,825.000033
100,068
pythondev
help
weird. does `render(request, 'accounts/login.html', context = {})` do anything?
2017-11-11T07:21:53.000011
Meg
pythondev_help_Meg_2017-11-11T07:21:53.000011
1,510,384,913.000011
100,069
pythondev
help
Still the same
2017-11-11T07:23:04.000096
Georgetta
pythondev_help_Georgetta_2017-11-11T07:23:04.000096
1,510,384,984.000096
100,070
pythondev
help
and this just happened?
2017-11-11T07:25:34.000068
Meg
pythondev_help_Meg_2017-11-11T07:25:34.000068
1,510,385,134.000068
100,071
pythondev
help
what django version?
2017-11-11T07:25:40.000065
Meg
pythondev_help_Meg_2017-11-11T07:25:40.000065
1,510,385,140.000065
100,072
pythondev
help
1.11
2017-11-11T07:26:33.000004
Georgetta
pythondev_help_Georgetta_2017-11-11T07:26:33.000004
1,510,385,193.000004
100,073
pythondev
help
latest dot release is 1.11.7, I believe. are you on that one?
2017-11-11T07:27:06.000059
Meg
pythondev_help_Meg_2017-11-11T07:27:06.000059
1,510,385,226.000059
100,074
pythondev
help
Before it works, today i get that
2017-11-11T07:27:14.000048
Georgetta
pythondev_help_Georgetta_2017-11-11T07:27:14.000048
1,510,385,234.000048
100,075
pythondev
help
1.11.5
2017-11-11T07:27:18.000009
Georgetta
pythondev_help_Georgetta_2017-11-11T07:27:18.000009
1,510,385,238.000009
100,076
pythondev
help
Hello all, quick question python/SQLite related:
2017-11-11T08:23:13.000098
Blanche
pythondev_help_Blanche_2017-11-11T08:23:13.000098
1,510,388,593.000098
100,077
pythondev
help
insert into something(abc, def) values(?,?) where equipment = row[referencing something else]
2017-11-11T08:24:10.000048
Blanche
pythondev_help_Blanche_2017-11-11T08:24:10.000048
1,510,388,650.000048
100,078
pythondev
help
`cursor.execute('''INSERT INTO machines(EQUIPMENT, DESCRIPTION, PLANT, DEPARTMENT) VALUES(?,?,?,?)''', (row[0], row[1], row[4], row[2]))`
2017-11-11T08:24:40.000072
Blanche
pythondev_help_Blanche_2017-11-11T08:24:40.000072
1,510,388,680.000072
100,079
pythondev
help
so I'm referencing something outside (with the rows), but if I want to add a WHERE Something = row[9]
2017-11-11T08:25:06.000034
Blanche
pythondev_help_Blanche_2017-11-11T08:25:06.000034
1,510,388,706.000034
100,080
pythondev
help
will it change to `cursor.execute('''INSERT INTO machines(EQUIPMENT, DESCRIPTION, PLANT, DEPARTMENT) VALUES(?,?,?,?) WHERE SOMETHING = (?)''', (row[0], row[1], row[4], row[2], NEW_ADDITION_ROW[9]))`
2017-11-11T08:25:53.000062
Blanche
pythondev_help_Blanche_2017-11-11T08:25:53.000062
1,510,388,753.000062
100,081
pythondev
help
Does that make sense?
2017-11-11T08:25:56.000062
Blanche
pythondev_help_Blanche_2017-11-11T08:25:56.000062
1,510,388,756.000062
100,082
pythondev
help
INSERT ... WHERE? Haven't seen this yet.
2017-11-11T08:32:01.000038
Suellen
pythondev_help_Suellen_2017-11-11T08:32:01.000038
1,510,389,121.000038
100,083
pythondev
help
There's `INSERT INTO a SELECT ... FROM b WHERE ...`, but it's different
2017-11-11T08:32:16.000068
Suellen
pythondev_help_Suellen_2017-11-11T08:32:16.000068
1,510,389,136.000068
100,084
pythondev
help
How would this INSERT statement work anyway?
2017-11-11T08:32:35.000032
Suellen
pythondev_help_Suellen_2017-11-11T08:32:35.000032
1,510,389,155.000032
100,085
pythondev
help
I have a table with 800 machines, and my python script will go through 32,000 reports and add up the downtime, count, time between breakdowns, etc. I want to add values for one specific machine
2017-11-11T08:35:44.000057
Blanche
pythondev_help_Blanche_2017-11-11T08:35:44.000057
1,510,389,344.000057
100,086
pythondev
help
Table has machine 1, 2, 3, etc. I gather info on machine 1, so I want to add values to machine 1
2017-11-11T08:36:24.000010
Blanche
pythondev_help_Blanche_2017-11-11T08:36:24.000010
1,510,389,384.00001
100,087
pythondev
help
Say my table has machines, downtime, and count. I want to go to machine 2, and add values that I have in variables. Then in my for loop, the machine number changes to 3, then I want to insert information
2017-11-11T08:37:31.000021
Blanche
pythondev_help_Blanche_2017-11-11T08:37:31.000021
1,510,389,451.000021
100,088
pythondev
help
I removed a few things that don't make any sense,
2017-11-11T08:39:10.000057
Blanche
pythondev_help_Blanche_2017-11-11T08:39:10.000057
1,510,389,550.000057
100,089
pythondev
help
INSERT just doesn't work like that, I'm afraid
2017-11-11T08:40:08.000012
Suellen
pythondev_help_Suellen_2017-11-11T08:40:08.000012
1,510,389,608.000012
100,090
pythondev
help
That's unfortunate
2017-11-11T08:40:35.000066
Blanche
pythondev_help_Blanche_2017-11-11T08:40:35.000066
1,510,389,635.000066
100,091
pythondev
help
Update perhaps?
2017-11-11T08:40:54.000007
Blanche
pythondev_help_Blanche_2017-11-11T08:40:54.000007
1,510,389,654.000007
100,092
pythondev
help
`cursor.execute('''UPDATE kpi SET DT_ALL, MTTR_ALL, MTBR_ALL) VALUES(?,?,?) WHERE EQUIPMENT = ?'''(downtime, downtime_avg, time_between_avg, row[0]))`
2017-11-11T08:46:59.000038
Blanche
pythondev_help_Blanche_2017-11-11T08:46:59.000038
1,510,390,019.000038
100,093
pythondev
help
`cursor.execute('''UPDATE kpi SET DT_ALL = %s, MTTR_ALL = %s, MTBR_ALL = %s WHERE EQUIPMENT = %s ''', (downtime, downtime_avg, time_between_avg, row[0]))`
2017-11-11T09:01:25.000030
Blanche
pythondev_help_Blanche_2017-11-11T09:01:25.000030
1,510,390,885.00003
100,094
pythondev
help
still doesn't work, but possibly getting closer
2017-11-11T09:01:33.000068
Blanche
pythondev_help_Blanche_2017-11-11T09:01:33.000068
1,510,390,893.000068
100,095
pythondev
help
nvm,.. Got it. Thanks leovp
2017-11-11T09:19:21.000097
Blanche
pythondev_help_Blanche_2017-11-11T09:19:21.000097
1,510,391,961.000097
100,096
pythondev
help
Hey everyone, I have no experience in python and I was asked to make a web scraper with python and mariaDB without any scraping library and I have 2 days to do it, Any help please !!
2017-11-11T10:55:33.000010
Katharine
pythondev_help_Katharine_2017-11-11T10:55:33.000010
1,510,397,733.00001
100,097
pythondev
help
<@Katharine> my hourly rate is $30
2017-11-11T11:10:26.000002
Collette
pythondev_help_Collette_2017-11-11T11:10:26.000002
1,510,398,626.000002
100,098
pythondev
help
<@Katharine> I'm guessing you're getting a crash course in BeautifulSoup, do you have an ORM/ODM?
2017-11-11T12:57:39.000076
Seema
pythondev_help_Seema_2017-11-11T12:57:39.000076
1,510,405,059.000076
100,099
pythondev
help
<@Katharine> Why the restriction of no scraping library?
2017-11-11T15:44:15.000029
Sidney
pythondev_help_Sidney_2017-11-11T15:44:15.000029
1,510,415,055.000029
100,100
pythondev
help
What to do when you’re harassed on here?
2017-11-11T16:39:33.000040
Therese
pythondev_help_Therese_2017-11-11T16:39:33.000040
1,510,418,373.00004
100,101
pythondev
help
you can contact the admin on the <#C07G55QES|meta> channel, via the `/admin` command or via email <mailto:pythondev.slack@gmail.com|pythondev.slack@gmail.com>
2017-11-11T16:41:53.000001
Ciera
pythondev_help_Ciera_2017-11-11T16:41:53.000001
1,510,418,513.000001
100,102