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
eg `def cache_control(**kwargs):`
2019-04-01T08:19:47.516800
Hiroko
pythondev_help_Hiroko_2019-04-01T08:19:47.516800
1,554,106,787.5168
16,221
pythondev
help
Quick question regarding websockets. I am trying to hobby my way to crypto trading but this is my first foray into websockets. I am getting absolutely nothing in response in my terminal. Using this library: <https://websockets.readthedocs.io/en/stable/intro.html>
2019-04-01T08:20:26.516900
Arcelia
pythondev_help_Arcelia_2019-04-01T08:20:26.516900
1,554,106,826.5169
16,222
pythondev
help
``` @access_logger() class ArticleViewSet(BaseWMSViewSetMixin): def access_logger(**kwargs): def decorator(f): @wraps(f) def wrap(request, *args, **kwargs): print('test.') return f(request, *args, **kwargs) return wrap return decorator ``` returns `access_logger() takes 0 positional arguments but 1 was given` so instead i try `@access_logger` -&gt; results 404 again
2019-04-01T08:22:19.518400
Eliz
pythondev_help_Eliz_2019-04-01T08:22:19.518400
1,554,106,939.5184
16,223
pythondev
help
when getting values from nested objects in a dictionary, is there any best practice in terms of getting nested objects muiltple times? a bit vague, maybe this helps: ``` shirt = { id: 1, properties: { color: 'blue', size: 'L' } } ``` Nest into properties twice: `shirt_color = shirt.get('properties').get('color')` `shirt_size = shirt.get('properties').get('size')` Or get parent object once and then continue there: `shirt_properties = shirt.get('properties')` `shirt_size = shirt_properties.get('color')` `shirt_size = shirt_properties.get('size')` Or is there no difference?
2019-04-01T08:37:52.521900
Dawn
pythondev_help_Dawn_2019-04-01T08:37:52.521900
1,554,107,872.5219
16,224
pythondev
help
<@Dawn> a couple of answers - the latter might be ever so slightly more performant, as you are accessing `properties` only once. In this use case it is minimal, but with larger or deeper data it could impact you. I would also be wary about missing keys - it can be handled in both of these cases, but they lend themselves to being handled differently - in the first case to `shirt.get('properties', {}).get('color',None)` the second more to wrapping the properties in a `try....except KeyError` and then not bothering to look up color and size, just setting them to None.
2019-04-01T08:46:24.526800
Clemmie
pythondev_help_Clemmie_2019-04-01T08:46:24.526800
1,554,108,384.5268
16,225
pythondev
help
Hey, I'm trying to create a github repo via cli inside python on windows with `subprocess.call(f'curl <https://api.github.com/user/repos?access_token={TOKEN}> -d "{{\"name\": \"{NEW}\", \"private\": {str(PRIVATE).lower()}}}"', shell=True)` what I get back: ``` { "message": "Problems parsing JSON", "documentation_url": "<https://developer.github.com/v3/repos/#create>" } ``` Any ideas? In my point of view I followed the instructions in `<https://developer.github.com/v3/repos/#create>` detail ;-(
2019-04-01T08:49:37.529000
Shawana
pythondev_help_Shawana_2019-04-01T08:49:37.529000
1,554,108,577.529
16,226
pythondev
help
Thanks. Yeah i'm using this for ETL so i'll go for the more performant one. Using the replacement empty dict and None for the end value should be enough right?
2019-04-01T08:50:47.529700
Dawn
pythondev_help_Dawn_2019-04-01T08:50:47.529700
1,554,108,647.5297
16,227
pythondev
help
can you get that subprocess to print what it is calling? then you can debug the curl by hand and backpropagate to the correct call
2019-04-01T08:51:18.530400
Clemmie
pythondev_help_Clemmie_2019-04-01T08:51:18.530400
1,554,108,678.5304
16,228
pythondev
help
Should be, if getting None for your terminal value when the intermediate key is missing is the correct behavior
2019-04-01T08:52:32.530800
Clemmie
pythondev_help_Clemmie_2019-04-01T08:52:32.530800
1,554,108,752.5308
16,229
pythondev
help
it's calling : `curl <https://api.github.com/user/repos?access_token=&lt;m_token&gt;> -d "{"name": "TESTPROJECT", "private": true}"`
2019-04-01T08:52:43.531100
Shawana
pythondev_help_Shawana_2019-04-01T08:52:43.531100
1,554,108,763.5311
16,230
pythondev
help
Yes that would be converted into a NULL value in the destination database, so that would be prefereable
2019-04-01T08:52:52.531200
Dawn
pythondev_help_Dawn_2019-04-01T08:52:52.531200
1,554,108,772.5312
16,231
pythondev
help
Thanks again!
2019-04-01T08:52:54.531400
Dawn
pythondev_help_Dawn_2019-04-01T08:52:54.531400
1,554,108,774.5314
16,232
pythondev
help
I’m guessing is it a problem with quotes - that looks odd to me for some reason
2019-04-01T08:53:49.532200
Clemmie
pythondev_help_Clemmie_2019-04-01T08:53:49.532200
1,554,108,829.5322
16,233
pythondev
help
:thumbsup:
2019-04-01T08:53:59.532300
Clemmie
pythondev_help_Clemmie_2019-04-01T08:53:59.532300
1,554,108,839.5323
16,234
pythondev
help
Ahhh, DANG. Yes. `subprocess.call(f'curl <https://api.github.com/user/repos?access_token={TOKEN}> -d "{{\\"name\\": \\"{NEW}\\", \\"private\\": {str(PRIVATE).lower()}}}"', shell=True)` works.. the curl had to be called escaped too, not only the python string :open_mouth:
2019-04-01T08:55:22.533000
Shawana
pythondev_help_Shawana_2019-04-01T08:55:22.533000
1,554,108,922.533
16,235
pythondev
help
<@Clemmie> :taco:
2019-04-01T08:56:00.533300
Shawana
pythondev_help_Shawana_2019-04-01T08:56:00.533300
1,554,108,960.5333
16,236
pythondev
help
Shelling out to curl seems a bit weird – why not just make the HTTP call from Python?
2019-04-01T09:05:29.534000
Melynda
pythondev_help_Melynda_2019-04-01T09:05:29.534000
1,554,109,529.534
16,237
pythondev
help
If you must use `subprocess`, you might be better off passing `args` as "a sequence of program arguments" rather than fighting shell parsing semantics, too. `subprocess.call(['curl', url, '-d', json_data])` might work.
2019-04-01T09:08:13.535300
Melynda
pythondev_help_Melynda_2019-04-01T09:08:13.535300
1,554,109,693.5353
16,238
pythondev
help
&gt; Providing a sequence of arguments is generally preferred, as it allows the module to take care of any required escaping and quoting of arguments (e.g. to permit spaces in file names). If passing a single string, either shell must be True (see below) or else the string must simply name the program to be executed without specifying any arguments.
2019-04-01T09:08:39.535500
Melynda
pythondev_help_Melynda_2019-04-01T09:08:39.535500
1,554,109,719.5355
16,239
pythondev
help
Also, why not use an existing python github API SDK? There’s a few, like this: <https://github.com/PyGithub/PyGithub>
2019-04-01T09:25:21.536000
Letty
pythondev_help_Letty_2019-04-01T09:25:21.536000
1,554,110,721.536
16,240
pythondev
help
Hmn. I'll think about it.. I am trying to create a "new_project" script like this: ``` # # # # # # # # # # # # # # # # # # # # # projects = Path(PROJECTS_DIR) # switch to projects-directory os.chdir(str(projects)) # $ mkdir &lt;DIR&gt; os.makedirs(NEW, exist_ok=True) new_project_path = projects / NEW # switch inside new_dir os.chdir(str(new_project_path)) # mkvirtualenv &lt;name&gt; subprocess.call(["powershell.exe", "mkvirtualenv", NEW], shell=True) # git init subprocess.call("git init", shell=True) subprocess.call(f'git config user.email "{GIT_EMAIL}"', shell=True) subprocess.call(f'git config user.name "{GIT_USER}"', shell=True) subprocess.call(f'git config core.sshCommand "ssh -i ~/.ssh/id_rsa_{REPO}"', shell=True) subprocess.call("", shell=True) subprocess.call("git add .", shell=True) subprocess.call('git commit -m "Initial commit"', shell=True) ## create public or private AZURE or GITHUB repo, set origin on github or azure if REPO == "GITHUB": subprocess.call(f'curl <https://api.github.com/user/repos?access_token={TOKEN}> -d "{{\\"name\\": \\"{NEW}\\", \\"private\\": {str(PRIVATE).lower()}}}"', shell=True) subprocess.call(f"git remote add origin [email protected]:{GIT_USER}/{NEW}.git", shell=True) subprocess.call("git push -u origin master", shell=True) ... ```
2019-04-01T09:32:22.537000
Shawana
pythondev_help_Shawana_2019-04-01T09:32:22.537000
1,554,111,142.537
16,241
pythondev
help
Running into an annoying AWS API Gateway issue where they are transforming my XML response and it's killing my stuff. API Gateway hits a lambda that returns this response, I have verified in CloudWatch logs that this is the exact response being returned: ``` &lt;Response&gt; &lt;Transfer transferTo="{redacted}"&gt;&lt;/Transfer&gt; &lt;/Response&gt; ``` But when I hit the endpoint I see the following response: ``` &lt;Response&gt; &lt;Transfer transferTo="{redacted}"/&gt; &lt;/Response&gt; ``` You'd think it wouldn't matter but the thing consuming that response requires the first format. Curious if anyone has ran into wonky API Gateway stuff
2019-04-01T09:37:06.539900
Claudine
pythondev_help_Claudine_2019-04-01T09:37:06.539900
1,554,111,426.5399
16,242
pythondev
help
Hm I tried the shirt.get('properties', {}).get('color',None) method, and if there's no properties, it throws `AttributeError: 'NoneType' object has no attribute 'get'`
2019-04-01T09:50:56.540000
Dawn
pythondev_help_Dawn_2019-04-01T09:50:56.540000
1,554,112,256.54
16,243
pythondev
help
so apparently it doesn't set it to an empty dict :thinking_face:
2019-04-01T09:51:07.540200
Dawn
pythondev_help_Dawn_2019-04-01T09:51:07.540200
1,554,112,267.5402
16,244
pythondev
help
I think that is actually saying that `shirt` is none. I tested the rest with an empyt dict and it worked fine
2019-04-01T09:52:26.540400
Clemmie
pythondev_help_Clemmie_2019-04-01T09:52:26.540400
1,554,112,346.5404
16,245
pythondev
help
Try removing the second `get` and see what happens
2019-04-01T09:52:50.540900
Clemmie
pythondev_help_Clemmie_2019-04-01T09:52:50.540900
1,554,112,370.5409
16,246
pythondev
help
Technically the second one is correct I think?
2019-04-01T09:52:58.541400
Jonas
pythondev_help_Jonas_2019-04-01T09:52:58.541400
1,554,112,378.5414
16,247
pythondev
help
i think they are both technically correct
2019-04-01T09:54:26.541700
Claudine
pythondev_help_Claudine_2019-04-01T09:54:26.541700
1,554,112,466.5417
16,248
pythondev
help
the problem is that im sending this response to a 3rd party API and they apparently require the first format
2019-04-01T09:54:45.542200
Claudine
pythondev_help_Claudine_2019-04-01T09:54:45.542200
1,554,112,485.5422
16,249
pythondev
help
Both are indeed correct. That sucks that the third-party aren't using a valid XML parser, though. :confused:
2019-04-01T09:55:50.543800
Melynda
pythondev_help_Melynda_2019-04-01T09:55:50.543800
1,554,112,550.5438
16,250
pythondev
help
i have logging in the lambda generating this response and I can see it is generating the first format, but it seems like API Gateway transforms it to the second format
2019-04-01T09:55:51.543900
Claudine
pythondev_help_Claudine_2019-04-01T09:55:51.543900
1,554,112,551.5439
16,251
pythondev
help
yea indeed it does
2019-04-01T09:55:58.544100
Claudine
pythondev_help_Claudine_2019-04-01T09:55:58.544100
1,554,112,558.5441
16,252
pythondev
help
I have to demo functionality in 5 hours so i don't have enough time to tell them to fix their stuff haha
2019-04-01T09:56:23.544700
Claudine
pythondev_help_Claudine_2019-04-01T09:56:23.544700
1,554,112,583.5447
16,253
pythondev
help
Can you tell the API gateway that it's plaintext instead of XML, so it'll leave it alone? Never used it…
2019-04-01T09:57:36.545200
Melynda
pythondev_help_Melynda_2019-04-01T09:57:36.545200
1,554,112,656.5452
16,254
pythondev
help
hmmm good idea, im setting `'Content-Type': 'text/xml'` headers currently so I can try setting plaintext
2019-04-01T10:00:47.545700
Claudine
pythondev_help_Claudine_2019-04-01T10:00:47.545700
1,554,112,847.5457
16,255
pythondev
help
ill give it a shot, got a taco warming up for ya
2019-04-01T10:01:03.546000
Claudine
pythondev_help_Claudine_2019-04-01T10:01:03.546000
1,554,112,863.546
16,256
pythondev
help
hey all .. anyone have experience with setting up postgres on ubuntu server for remote connections?
2019-04-01T10:05:30.546600
Deon
pythondev_help_Deon_2019-04-01T10:05:30.546600
1,554,113,130.5466
16,257
pythondev
help
please be moe specific with your questions - what you have tried, what error you are encountering
2019-04-01T10:07:29.547400
Clemmie
pythondev_help_Clemmie_2019-04-01T10:07:29.547400
1,554,113,249.5474
16,258
pythondev
help
that said, you almost certainly need to edit your `pg_hba.conf`
2019-04-01T10:07:51.547900
Clemmie
pythondev_help_Clemmie_2019-04-01T10:07:51.547900
1,554,113,271.5479
16,259
pythondev
help
i've tried editing pg_hba.conf 'host all all 0.0.0.0/0 md5'
2019-04-01T10:09:51.548300
Deon
pythondev_help_Deon_2019-04-01T10:09:51.548300
1,554,113,391.5483
16,260
pythondev
help
tried postgres.conf 'listen_addresses='*''
2019-04-01T10:10:01.548600
Deon
pythondev_help_Deon_2019-04-01T10:10:01.548600
1,554,113,401.5486
16,261
pythondev
help
add 'iptables -A INPUT -s 0/0 -p tcp --dport 5432 -j ACCEPT'
2019-04-01T10:10:10.548800
Deon
pythondev_help_Deon_2019-04-01T10:10:10.548800
1,554,113,410.5488
16,262
pythondev
help
i've tried setting up a pg db on multiple machines and tried connecting, so i have a feeling i'm missing something with the setup...
2019-04-01T10:11:23.549700
Deon
pythondev_help_Deon_2019-04-01T10:11:23.549700
1,554,113,483.5497
16,263
pythondev
help
<@Melynda> :taco: i'll give you one for the clever thought, ultimately the error was something else but your suggestion led me to the issue
2019-04-01T10:21:43.550700
Claudine
pythondev_help_Claudine_2019-04-01T10:21:43.550700
1,554,114,103.5507
16,264
pythondev
help
turns out their XML parser is fine, the issue was that they hit our endpoint for a response multiple times for different "event_types", and we were returning that response for the wrong "event_type"
2019-04-01T10:22:39.551800
Claudine
pythondev_help_Claudine_2019-04-01T10:22:39.551800
1,554,114,159.5518
16,265
pythondev
help
pretty much everytime i blame someone else for doing something weird i eventually realize the error was my fault or my misunderstanding
2019-04-01T10:23:48.552900
Claudine
pythondev_help_Claudine_2019-04-01T10:23:48.552900
1,554,114,228.5529
16,266
pythondev
help
that's just how our job works
2019-04-01T10:25:15.553300
Carlo
pythondev_help_Carlo_2019-04-01T10:25:15.553300
1,554,114,315.5533
16,267
pythondev
help
lol yup
2019-04-01T10:25:21.553600
Claudine
pythondev_help_Claudine_2019-04-01T10:25:21.553600
1,554,114,321.5536
16,268
pythondev
help
most of the time it's our own damn fault
2019-04-01T10:25:33.554100
Carlo
pythondev_help_Carlo_2019-04-01T10:25:33.554100
1,554,114,333.5541
16,269
pythondev
help
PEBKAC is real
2019-04-01T10:25:52.554700
Carlo
pythondev_help_Carlo_2019-04-01T10:25:52.554700
1,554,114,352.5547
16,270
pythondev
help
yup, that and being 100% convinced the error lays in a specific spot, or being 100% convinced of what the error actually is. Then realizing you were totally wrong
2019-04-01T10:26:05.555100
Claudine
pythondev_help_Claudine_2019-04-01T10:26:05.555100
1,554,114,365.5551
16,271
pythondev
help
i blame spotty documentation for most misunderstanding and the log for most solutions
2019-04-01T10:26:49.555700
Claudine
pythondev_help_Claudine_2019-04-01T10:26:49.555700
1,554,114,409.5557
16,272
pythondev
help
log is god
2019-04-01T10:26:55.555900
Claudine
pythondev_help_Claudine_2019-04-01T10:26:55.555900
1,554,114,415.5559
16,273
pythondev
help
_proper_ logging is so good
2019-04-01T10:27:27.556500
Carlo
pythondev_help_Carlo_2019-04-01T10:27:27.556500
1,554,114,447.5565
16,274
pythondev
help
now im in the most relaxing part of my dev cycle, styling and tidying up
2019-04-01T10:29:07.559100
Claudine
pythondev_help_Claudine_2019-04-01T10:29:07.559100
1,554,114,547.5591
16,275
pythondev
help
aka `Turd Polishing`
2019-04-01T10:29:15.559400
Claudine
pythondev_help_Claudine_2019-04-01T10:29:15.559400
1,554,114,555.5594
16,276
pythondev
help
that one's almost soothing
2019-04-01T10:29:20.559500
Carlo
pythondev_help_Carlo_2019-04-01T10:29:20.559500
1,554,114,560.5595
16,277
pythondev
help
it really is
2019-04-01T10:29:30.559700
Claudine
pythondev_help_Claudine_2019-04-01T10:29:30.559700
1,554,114,570.5597
16,278
pythondev
help
renaming some variables for clarity, plopping in comments and stuff, tweaking the UI
2019-04-01T10:30:09.560500
Claudine
pythondev_help_Claudine_2019-04-01T10:30:09.560500
1,554,114,609.5605
16,279
pythondev
help
hello I'm using mail admins method from django <https://docs.djangoproject.com/en/2.1/topics/email/#mail-admins>
2019-04-01T10:48:14.561300
Lourie
pythondev_help_Lourie_2019-04-01T10:48:14.561300
1,554,115,694.5613
16,280
pythondev
help
as well on settings i let ADMINS = []
2019-04-01T10:48:29.561800
Lourie
pythondev_help_Lourie_2019-04-01T10:48:29.561800
1,554,115,709.5618
16,281
pythondev
help
and in settings_prod I set ADMINS = [('Support', '<mailto:[email protected]|[email protected]>')]
2019-04-01T10:49:12.562400
Lourie
pythondev_help_Lourie_2019-04-01T10:49:12.562400
1,554,115,752.5624
16,282
pythondev
help
and in settings_dev I set ADMINS = [('Dev', '<mailto:[email protected]|[email protected]>')]
2019-04-01T10:49:30.562800
Lourie
pythondev_help_Lourie_2019-04-01T10:49:30.562800
1,554,115,770.5628
16,283
pythondev
help
but i get botth mails on <mailto:[email protected]|[email protected]>
2019-04-01T10:50:11.563600
Lourie
pythondev_help_Lourie_2019-04-01T10:50:11.563600
1,554,115,811.5636
16,284
pythondev
help
any way how to debug or solve this?
2019-04-01T10:50:25.564000
Lourie
pythondev_help_Lourie_2019-04-01T10:50:25.564000
1,554,115,825.564
16,285
pythondev
help
are you sure you’re using the right settings module?
2019-04-01T10:50:41.564500
Hiroko
pythondev_help_Hiroko_2019-04-01T10:50:41.564500
1,554,115,841.5645
16,286
pythondev
help
yep, as well I also have different virtualenv for them...
2019-04-01T10:51:31.564900
Lourie
pythondev_help_Lourie_2019-04-01T10:51:31.564900
1,554,115,891.5649
16,287
pythondev
help
and are you sure there’s no route from support to dev email?
2019-04-01T10:52:30.565300
Hiroko
pythondev_help_Hiroko_2019-04-01T10:52:30.565300
1,554,115,950.5653
16,288
pythondev
help
no
2019-04-01T11:01:38.565500
Lourie
pythondev_help_Lourie_2019-04-01T11:01:38.565500
1,554,116,498.5655
16,289
pythondev
help
isnt any route
2019-04-01T11:01:48.565700
Lourie
pythondev_help_Lourie_2019-04-01T11:01:48.565700
1,554,116,508.5657
16,290
pythondev
help
if you change the email target in `settings_dev` does it change where the email goes while running `settings_production`?
2019-04-01T11:08:00.566600
Clemmie
pythondev_help_Clemmie_2019-04-01T11:08:00.566600
1,554,116,880.5666
16,291
pythondev
help
hey there ! Currently i m learning python now should i go for machine learning or android development is a better option ?
2019-04-01T13:10:44.568300
Sharee
pythondev_help_Sharee_2019-04-01T13:10:44.568300
1,554,124,244.5683
16,292
pythondev
help
<@Sharee> focus on the basics first :wink:
2019-04-01T13:33:53.000300
Ashley
pythondev_help_Ashley_2019-04-01T13:33:53.000300
1,554,125,633.0003
16,293
pythondev
help
Good afternoon, anyone know where I can find a resource on putting a 2nd timestamp beside a primary time stamp. im trying to use a for loop but having issues
2019-04-01T14:47:45.001500
Nola
pythondev_help_Nola_2019-04-01T14:47:45.001500
1,554,130,065.0015
16,294
pythondev
help
what kind of structure?
2019-04-01T14:49:18.002300
Hiroko
pythondev_help_Hiroko_2019-04-01T14:49:18.002300
1,554,130,158.0023
16,295
pythondev
help
and can you show the code you have so far?
2019-04-01T14:49:39.002800
Clemmie
pythondev_help_Clemmie_2019-04-01T14:49:39.002800
1,554,130,179.0028
16,296
pythondev
help
Hey is there a way to disable labels of pie chart with zero value as percents in matplotlib
2019-04-01T14:52:20.003500
Janis
pythondev_help_Janis_2019-04-01T14:52:20.003500
1,554,130,340.0035
16,297
pythondev
help
None
2019-04-01T14:52:30.003600
Janis
pythondev_help_Janis_2019-04-01T14:52:30.003600
1,554,130,350.0036
16,298
pythondev
help
dataframe
2019-04-01T14:52:34.003900
Nola
pythondev_help_Nola_2019-04-01T14:52:34.003900
1,554,130,354.0039
16,299
pythondev
help
When i plot the pie chart i dont want to display 'b' and 'c' i neither want to remove them because eventually they become greater than zero
2019-04-01T14:53:16.004800
Janis
pythondev_help_Janis_2019-04-01T14:53:16.004800
1,554,130,396.0048
16,300
pythondev
help
sorry I erased the code several times so I'm stuck here. i tried to index then it got complicated so i started to google instackflow
2019-04-01T14:54:55.005000
Nola
pythondev_help_Nola_2019-04-01T14:54:55.005000
1,554,130,495.005
16,301
pythondev
help
is there a native way to post JSON data to a REST endpoint using Django? to be clear, I don't want to handle REST calls in the Django app, I'm sending JSON to an endpoint not within our org
2019-04-01T15:01:16.006300
Lawrence
pythondev_help_Lawrence_2019-04-01T15:01:16.006300
1,554,130,876.0063
16,302
pythondev
help
Not straight in Django, no. You're looking for the `requests` module.
2019-04-01T15:02:17.006700
Carmen
pythondev_help_Carmen_2019-04-01T15:02:17.006700
1,554,130,937.0067
16,303
pythondev
help
No reason for Django to reimplement that when Requests is as good as it is.
2019-04-01T15:02:44.007300
Carmen
pythondev_help_Carmen_2019-04-01T15:02:44.007300
1,554,130,964.0073
16,304
pythondev
help
yah I was going to use requests but was not sure if there was a way to do this with Django that was more conventional
2019-04-01T15:03:05.007700
Lawrence
pythondev_help_Lawrence_2019-04-01T15:03:05.007700
1,554,130,985.0077
16,305
pythondev
help
totally agree <@Carmen> thanks! :taco:
2019-04-01T15:03:15.008000
Lawrence
pythondev_help_Lawrence_2019-04-01T15:03:15.008000
1,554,130,995.008
16,306
pythondev
help
any work around other than writing another function?
2019-04-01T15:30:06.010100
Nenita
pythondev_help_Nenita_2019-04-01T15:30:06.010100
1,554,132,606.0101
16,307
pythondev
help
i guess the lazy way would be renaming the __init__ to something else
2019-04-01T15:32:44.011100
Nenita
pythondev_help_Nenita_2019-04-01T15:32:44.011100
1,554,132,764.0111
16,308
pythondev
help
Need some more context there... normally an `__init__()` routine doesn't return anything, since it's just operating on `self`.
2019-04-01T15:32:48.011300
Sasha
pythondev_help_Sasha_2019-04-01T15:32:48.011300
1,554,132,768.0113
16,309
pythondev
help
yea, ill just rename the function because thankfully, i just used __init__ as a beginning procedure for my class
2019-04-01T15:33:25.011900
Nenita
pythondev_help_Nenita_2019-04-01T15:33:25.011900
1,554,132,805.0119
16,310
pythondev
help
but renaming it wont affect anything
2019-04-01T15:33:36.012200
Nenita
pythondev_help_Nenita_2019-04-01T15:33:36.012200
1,554,132,816.0122
16,311
pythondev
help
Yeah, renaming is smart. You don't want to use dunder methods for non-standard uses, since they'll get called when you don't want them to.
2019-04-01T15:34:36.012900
Sasha
pythondev_help_Sasha_2019-04-01T15:34:36.012900
1,554,132,876.0129
16,312
pythondev
help
renaming __init__ to inialize seems to do justice just fine haha
2019-04-01T15:35:18.013600
Nenita
pythondev_help_Nenita_2019-04-01T15:35:18.013600
1,554,132,918.0136
16,313
pythondev
help
*initialize
2019-04-01T15:35:25.013800
Nenita
pythondev_help_Nenita_2019-04-01T15:35:25.013800
1,554,132,925.0138
16,314
pythondev
help
so after renameing that function, i cannot call another function using self, but rather typing out the class name then function name. is there a reason for this? if so, i cannot figure it out.
2019-04-01T15:42:51.014500
Nenita
pythondev_help_Nenita_2019-04-01T15:42:51.014500
1,554,133,371.0145
16,315
pythondev
help
'Invoices' object has no attribute 'AdjustCx'
2019-04-01T15:43:58.014700
Nenita
pythondev_help_Nenita_2019-04-01T15:43:58.014700
1,554,133,438.0147
16,316
pythondev
help
yea, i had to use ConnectQB.AdjustCx rather than self.AdjustCx
2019-04-01T15:45:43.015400
Nenita
pythondev_help_Nenita_2019-04-01T15:45:43.015400
1,554,133,543.0154
16,317
pythondev
help
where’s the guy who loves regex? I’m having some trouble.
2019-04-01T15:47:52.015800
Virgie
pythondev_help_Virgie_2019-04-01T15:47:52.015800
1,554,133,672.0158
16,318
pythondev
help
If you don't have an `__init__` method anymore, are your instance attributes being initialized anywhere?
2019-04-01T15:48:29.016500
Sasha
pythondev_help_Sasha_2019-04-01T15:48:29.016500
1,554,133,709.0165
16,319
pythondev
help
<@Virgie> you're thinking of <@Claudine> but post your problem :stuck_out_tongue:
2019-04-01T15:49:26.017100
Carlo
pythondev_help_Carlo_2019-04-01T15:49:26.017100
1,554,133,766.0171
16,320