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
that might make sense, because how do you translate a nested json structure to query params?
2019-03-28T07:04:57.032200
Hiroko
pythondev_help_Hiroko_2019-03-28T07:04:57.032200
1,553,756,697.0322
15,421
pythondev
help
The same range query works fine on kibana
2019-03-28T07:05:00.032500
Valeri
pythondev_help_Valeri_2019-03-28T07:05:00.032500
1,553,756,700.0325
15,422
pythondev
help
if the api interface doesn’t work
2019-03-28T07:05:05.032700
Hiroko
pythondev_help_Hiroko_2019-03-28T07:05:05.032700
1,553,756,705.0327
15,423
pythondev
help
is the kibana request a POST and not a GET?
2019-03-28T07:05:22.033300
Hiroko
pythondev_help_Hiroko_2019-03-28T07:05:22.033300
1,553,756,722.0333
15,424
pythondev
help
It's a GET
2019-03-28T07:05:29.033500
Valeri
pythondev_help_Valeri_2019-03-28T07:05:29.033500
1,553,756,729.0335
15,425
pythondev
help
``` GET _search { "query": { "range": { "created": { "gte": "2016-01-01", "lte": "2018-01-01", "format": "yyyy-MM-dd" } } } } ```
2019-03-28T07:05:41.033700
Valeri
pythondev_help_Valeri_2019-03-28T07:05:41.033700
1,553,756,741.0337
15,426
pythondev
help
then I would say requests doesn’t support this thing
2019-03-28T07:07:43.034300
Hiroko
pythondev_help_Hiroko_2019-03-28T07:07:43.034300
1,553,756,863.0343
15,427
pythondev
help
because every conversion I use for the curl to requests says to use `post`
2019-03-28T07:07:58.034700
Hiroko
pythondev_help_Hiroko_2019-03-28T07:07:58.034700
1,553,756,878.0347
15,428
pythondev
help
``` response = <http://requests.post|requests.post>( url=settings.ES_SERVER_URL + SEARCH_URL, headers={'Content-Type': 'application/json'}, data=query, ) ```
2019-03-28T07:09:33.034900
Valeri
pythondev_help_Valeri_2019-03-28T07:09:33.034900
1,553,756,973.0349
15,429
pythondev
help
``` [ "{\"error\":{\"root_cause\":[{\"type\":\"json_parse_exception\",\"reason\":\"Unrecognized token 'query': was expecting ('true', 'false' or '", "null')\\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@22046f33; line: 1, column: 7]\"}],\"type\":\"json_parse_e", "xception\",\"reason\":\"Unrecognized token 'query': was expecting ('true', 'false' or 'null')\\n at [Source: org.elasticsearch.transp", "ort.netty4.ByteBufStreamInput@22046f33; line: 1, column: 7]\"},\"status\":500}" ] ```
2019-03-28T07:09:41.035100
Valeri
pythondev_help_Valeri_2019-03-28T07:09:41.035100
1,553,756,981.0351
15,430
pythondev
help
<@Hiroko>
2019-03-28T07:09:51.035300
Valeri
pythondev_help_Valeri_2019-03-28T07:09:51.035300
1,553,756,991.0353
15,431
pythondev
help
¯\_(ツ)_/¯
2019-03-28T07:09:56.035400
Hiroko
pythondev_help_Hiroko_2019-03-28T07:09:56.035400
1,553,756,996.0354
15,432
pythondev
help
use the elastic python client?
2019-03-28T07:10:02.035600
Hiroko
pythondev_help_Hiroko_2019-03-28T07:10:02.035600
1,553,757,002.0356
15,433
pythondev
help
is there any reason you’re so focused on using requests?
2019-03-28T07:10:19.036000
Hiroko
pythondev_help_Hiroko_2019-03-28T07:10:19.036000
1,553,757,019.036
15,434
pythondev
help
you could also open up an issue with the requests project
2019-03-28T07:10:30.036300
Hiroko
pythondev_help_Hiroko_2019-03-28T07:10:30.036300
1,553,757,030.0363
15,435
pythondev
help
which is the best ide for python 3 (Windows 10)
2019-03-28T07:10:56.037100
Sharee
pythondev_help_Sharee_2019-03-28T07:10:56.037100
1,553,757,056.0371
15,436
pythondev
help
I like pycharm, but that’s got a steep learning curve for a beginner
2019-03-28T07:12:01.037800
Hiroko
pythondev_help_Hiroko_2019-03-28T07:12:01.037800
1,553,757,121.0378
15,437
pythondev
help
atom, vscode, sublime text are all good editors with quality plugins
2019-03-28T07:12:16.038300
Hiroko
pythondev_help_Hiroko_2019-03-28T07:12:16.038300
1,553,757,136.0383
15,438
pythondev
help
<@Valeri> <https://github.com/kennethreitz/requests/issues/4321#issuecomment-333515086>
2019-03-28T07:13:31.038500
Hiroko
pythondev_help_Hiroko_2019-03-28T07:13:31.038500
1,553,757,211.0385
15,439
pythondev
help
&gt;&gt;&gt;Some services, e.g., Elasticsearch, rely on sending bodies with certain methods that are otherwise not used in that way
2019-03-28T07:13:45.038800
Hiroko
pythondev_help_Hiroko_2019-03-28T07:13:45.038800
1,553,757,225.0388
15,440
pythondev
help
ye I stand by PyCharm or VSCode
2019-03-28T07:16:29.039300
Mica
pythondev_help_Mica_2019-03-28T07:16:29.039300
1,553,757,389.0393
15,441
pythondev
help
had a few issues with Atom
2019-03-28T07:16:33.039500
Mica
pythondev_help_Mica_2019-03-28T07:16:33.039500
1,553,757,393.0395
15,442
pythondev
help
Hi all. Has anyone ever attempted to run tests using the command `heroku local` or something along those lines? I realized that it is going to be a bit of a hassle re-writing my configs to go back to the ones provided by default for Django development and so I'd like to try to run my tests with my configurations as is from Heroku.
2019-03-28T07:58:10.040100
Jamey
pythondev_help_Jamey_2019-03-28T07:58:10.040100
1,553,759,890.0401
15,443
pythondev
help
Oh... Figured it out: apparently you use the following command `heroku local:run ./manage.py test`. If there's a better way of doing it, I'm all ears :sweat_smile:
2019-03-28T08:05:28.041500
Jamey
pythondev_help_Jamey_2019-03-28T08:05:28.041500
1,553,760,328.0415
15,444
pythondev
help
def get_author(author_id): conn = psycopg2.connect(user='postgres', password='256498', host='127.0.0.1', port='5432', database='bookstore') print("database connected") cursor = conn.cursor() cursor.execute("select * from authors where author_id = %s", (author_id, )) author_record = cursor. fetchall() author_data = [] for row in author_record: author = {} author['author_id'] = row[0] author['name'] = row[1] author['country'] = row[2] author['gender'] = row[3] author['book'] = row[4] cursor.close() conn.close() return jsonify(a_dict)
2019-03-28T08:11:05.041700
Elmira
pythondev_help_Elmira_2019-03-28T08:11:05.041700
1,553,760,665.0417
15,445
pythondev
help
please forget about the indentation style....
2019-03-28T08:11:23.042200
Elmira
pythondev_help_Elmira_2019-03-28T08:11:23.042200
1,553,760,683.0422
15,446
pythondev
help
Hello, I need someone help. For some weird reason, I don't know why I can't retrieve using the following route @app.route(api/v1/authors/&lt;int:author_id&gt;', methods=['GET', 'POST'])
2019-03-28T08:11:38.042300
Elmira
pythondev_help_Elmira_2019-03-28T08:11:38.042300
1,553,760,698.0423
15,447
pythondev
help
I used curl <http://localhost:5000/api/v1/authors/2>
2019-03-28T08:13:09.043600
Elmira
pythondev_help_Elmira_2019-03-28T08:13:09.043600
1,553,760,789.0436
15,448
pythondev
help
Error : request not found.
2019-03-28T08:13:17.044000
Elmira
pythondev_help_Elmira_2019-03-28T08:13:17.044000
1,553,760,797.044
15,449
pythondev
help
Any help?
2019-03-28T08:13:24.044300
Elmira
pythondev_help_Elmira_2019-03-28T08:13:24.044300
1,553,760,804.0443
15,450
pythondev
help
None
2019-03-28T08:56:30.044500
Elmira
pythondev_help_Elmira_2019-03-28T08:56:30.044500
1,553,763,390.0445
15,451
pythondev
help
Got a screenshot or a copy/paste instead ?
2019-03-28T08:58:47.045000
Thu
pythondev_help_Thu_2019-03-28T08:58:47.045000
1,553,763,527.045
15,452
pythondev
help
The screenshot reminds me of the time I used to work with Chegg
2019-03-28T09:01:26.045500
Valeri
pythondev_help_Valeri_2019-03-28T09:01:26.045500
1,553,763,686.0455
15,453
pythondev
help
Every question asked by millennials there had such photos attached
2019-03-28T09:01:58.046100
Valeri
pythondev_help_Valeri_2019-03-28T09:01:58.046100
1,553,763,718.0461
15,454
pythondev
help
Hahaha...
2019-03-28T09:02:44.046300
Elmira
pythondev_help_Elmira_2019-03-28T09:02:44.046300
1,553,763,764.0463
15,455
pythondev
help
None
2019-03-28T09:04:22.046400
Elmira
pythondev_help_Elmira_2019-03-28T09:04:22.046400
1,553,763,862.0464
15,456
pythondev
help
no but for real <@Elmira>, can you please send a software screenshot or a copy/paste of the code in a snippet
2019-03-28T09:06:50.047200
Thu
pythondev_help_Thu_2019-03-28T09:06:50.047200
1,553,764,010.0472
15,457
pythondev
help
Okay.
2019-03-28T09:07:23.047400
Elmira
pythondev_help_Elmira_2019-03-28T09:07:23.047400
1,553,764,043.0474
15,458
pythondev
help
<@Elmira> text is preferred over screenshots
2019-03-28T09:08:50.047900
Hiroko
pythondev_help_Hiroko_2019-03-28T09:08:50.047900
1,553,764,130.0479
15,459
pythondev
help
Much easier to review
2019-03-28T09:09:01.048300
Hiroko
pythondev_help_Hiroko_2019-03-28T09:09:01.048300
1,553,764,141.0483
15,460
pythondev
help
<https://get.slack.help/hc/en-us/articles/202288908-Format-your-messages#inline-code>
2019-03-28T09:09:46.048500
Hiroko
pythondev_help_Hiroko_2019-03-28T09:09:46.048500
1,553,764,186.0485
15,461
pythondev
help
good day all
2019-03-28T09:14:14.051100
Florencio
pythondev_help_Florencio_2019-03-28T09:14:14.051100
1,553,764,454.0511
15,462
pythondev
help
i'm having error inserting into a table with `ForeignKey`
2019-03-28T09:15:20.052000
Florencio
pythondev_help_Florencio_2019-03-28T09:15:20.052000
1,553,764,520.052
15,463
pythondev
help
``` app.route('/api/v1/authors/&lt;int:author_id&gt;', methods=['GET', 'POST']) def get_author(): conn = psycopg2.connect(user= 'postgres', password= 'possible', host='127.0.0.1', port='5432', database='bookstore') print("database connected successfully") author = [] cursor = conn.cursor() cursor.execute(SELECT * from authors where author_id=?", (author_id, )) data = cursor.fetchall() if len(data) != 0: author = {} author['author_id'] = row[0][0] author['name'] = row[0][1] author['country'] = row[0][2] author['gender'] = row[0][3] author['book'] = row[0][4] conn.close() return jsonify(a_dict) ```
2019-03-28T09:15:40.052100
Elmira
pythondev_help_Elmira_2019-03-28T09:15:40.052100
1,553,764,540.0521
15,464
pythondev
help
<@Hiroko> <@Thu>
2019-03-28T09:16:41.052700
Elmira
pythondev_help_Elmira_2019-03-28T09:16:41.052700
1,553,764,601.0527
15,465
pythondev
help
is it failing to get the request or run it?
2019-03-28T09:16:43.052800
Mica
pythondev_help_Mica_2019-03-28T09:16:43.052800
1,553,764,603.0528
15,466
pythondev
help
<@Elmira> you should use an ORM :slightly_smiling_face:
2019-03-28T09:17:13.054000
Thu
pythondev_help_Thu_2019-03-28T09:17:13.054000
1,553,764,633.054
15,467
pythondev
help
Failing to get request of author id
2019-03-28T09:17:20.054300
Elmira
pythondev_help_Elmira_2019-03-28T09:17:20.054300
1,553,764,640.0543
15,468
pythondev
help
do other IDs work?
2019-03-28T09:17:30.054700
Mica
pythondev_help_Mica_2019-03-28T09:17:30.054700
1,553,764,650.0547
15,469
pythondev
help
does the author exist
2019-03-28T09:17:33.055000
Mica
pythondev_help_Mica_2019-03-28T09:17:33.055000
1,553,764,653.055
15,470
pythondev
help
<@Florencio> Please say what you are trying to do, what you have tried, what errors you are getting, and any code that supports it
2019-03-28T09:17:36.055200
Clemmie
pythondev_help_Clemmie_2019-03-28T09:17:36.055200
1,553,764,656.0552
15,471
pythondev
help
<@Thu> Okay... I will do so
2019-03-28T09:17:47.055400
Elmira
pythondev_help_Elmira_2019-03-28T09:17:47.055400
1,553,764,667.0554
15,472
pythondev
help
Yes author id exist
2019-03-28T09:18:06.056500
Elmira
pythondev_help_Elmira_2019-03-28T09:18:06.056500
1,553,764,686.0565
15,473
pythondev
help
does it reach the first print statement?
2019-03-28T09:18:15.057000
Mica
pythondev_help_Mica_2019-03-28T09:18:15.057000
1,553,764,695.057
15,474
pythondev
help
<@Elmira> you have `author_id` in the route but aren’t passing it into the method
2019-03-28T09:18:25.057500
Clemmie
pythondev_help_Clemmie_2019-03-28T09:18:25.057500
1,553,764,705.0575
15,475
pythondev
help
at what poitn does the request fail?
2019-03-28T09:18:27.057800
Mica
pythondev_help_Mica_2019-03-28T09:18:27.057800
1,553,764,707.0578
15,476
pythondev
help
oh, lol didn't even notice that :joy:
2019-03-28T09:18:43.058300
Mica
pythondev_help_Mica_2019-03-28T09:18:43.058300
1,553,764,723.0583
15,477
pythondev
help
wait wouldn't that raise a different error?
2019-03-28T09:19:04.058600
Mica
pythondev_help_Mica_2019-03-28T09:19:04.058600
1,553,764,744.0586
15,478
pythondev
help
but ye that is also an issue
2019-03-28T09:19:12.059000
Mica
pythondev_help_Mica_2019-03-28T09:19:12.059000
1,553,764,752.059
15,479
pythondev
help
<@Clemmie> I passed it in a moment ago but same problem.
2019-03-28T09:19:35.059800
Elmira
pythondev_help_Elmira_2019-03-28T09:19:35.059800
1,553,764,775.0598
15,480
pythondev
help
This is `flask`?
2019-03-28T09:19:58.060000
Clemmie
pythondev_help_Clemmie_2019-03-28T09:19:58.060000
1,553,764,798.06
15,481
pythondev
help
Yeah, flask... To retrieve author from a postgres database with curl
2019-03-28T09:20:44.061100
Elmira
pythondev_help_Elmira_2019-03-28T09:20:44.061100
1,553,764,844.0611
15,482
pythondev
help
``` def transaction_view(request, id): tnx = Message.objects.get(id=id) pd = { 'tn': tnx, 'message': '', 'css': '' } if request.method == 'POST': # new_tnx = Transaction.objects.filter(message__name=tnx.fullname).values('message__fullname', 'message__email', '') amount_paid = int(<http://request.POST['amountPaid']|request.POST['amountPaid']>) amount_made = int(<http://request.POST['amountMade']|request.POST['amountMade']>) shipping_cost = int(<http://request.POST['shippingCost']|request.POST['shippingCost']>) vat = int(<http://request.POST['vat']|request.POST['vat']>) print("============= Print ===============") print(amount_made, amount_paid, shipping_cost, vat) data = Transaction.objects.create(message=tnx.id, money_paid=amount_paid, money_made=amount_made, shipping_cost=shipping_cost, vat=vat) if not data.save(): pd = { 'message': 'Failed', 'css': 'bg-red tc' } else: pd = { 'message': 'Success', 'css': 'bg-green tc' } print("Done") return render(request, 'manageportal/transaction_per_request.html', pd) ```
2019-03-28T09:21:17.061400
Florencio
pythondev_help_Florencio_2019-03-28T09:21:17.061400
1,553,764,877.0614
15,483
pythondev
help
my models looks like this:
2019-03-28T09:21:41.061700
Florencio
pythondev_help_Florencio_2019-03-28T09:21:41.061700
1,553,764,901.0617
15,484
pythondev
help
``` class Transaction(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, help_text='Unique ID for this particular request across whole system') message = models.ForeignKey('Message', on_delete=models.SET_NULL, null=True) ```
2019-03-28T09:22:02.061900
Florencio
pythondev_help_Florencio_2019-03-28T09:22:02.061900
1,553,764,922.0619
15,485
pythondev
help
I'm having this error: `Cannot assign "2": "Transaction.message" must be a "Message" instance.`
2019-03-28T09:22:25.062200
Florencio
pythondev_help_Florencio_2019-03-28T09:22:25.062200
1,553,764,945.0622
15,486
pythondev
help
Does the message with id `2` already exist? If it does change `message=tnx.id` to `message_id=tnx.id` If it doesn’t you need to create a message object and then hand that off to `message=`
2019-03-28T09:25:46.063400
Clemmie
pythondev_help_Clemmie_2019-03-28T09:25:46.063400
1,553,765,146.0634
15,487
pythondev
help
Or, simply `message=tnx`
2019-03-28T09:27:01.063800
Valeri
pythondev_help_Valeri_2019-03-28T09:27:01.063800
1,553,765,221.0638
15,488
pythondev
help
yup, I missed that
2019-03-28T09:27:14.064100
Clemmie
pythondev_help_Clemmie_2019-03-28T09:27:14.064100
1,553,765,234.0641
15,489
pythondev
help
yes it does
2019-03-28T09:28:13.064400
Florencio
pythondev_help_Florencio_2019-03-28T09:28:13.064400
1,553,765,293.0644
15,490
pythondev
help
<@Valeri> gave the best advice - it will be the most obvious/easiest/correct for your context
2019-03-28T09:29:00.065200
Clemmie
pythondev_help_Clemmie_2019-03-28T09:29:00.065200
1,553,765,340.0652
15,491
pythondev
help
yeah thanks
2019-03-28T09:30:05.065400
Florencio
pythondev_help_Florencio_2019-03-28T09:30:05.065400
1,553,765,405.0654
15,492
pythondev
help
that looks good
2019-03-28T09:30:09.065700
Florencio
pythondev_help_Florencio_2019-03-28T09:30:09.065700
1,553,765,409.0657
15,493
pythondev
help
:+1:
2019-03-28T09:43:16.066000
Valeri
pythondev_help_Valeri_2019-03-28T09:43:16.066000
1,553,766,196.066
15,494
pythondev
help
works
2019-03-28T09:53:35.066200
Florencio
pythondev_help_Florencio_2019-03-28T09:53:35.066200
1,553,766,815.0662
15,495
pythondev
help
Knowing how to ask a good question is a highly invaluable skill that will benefit you greatly in any career. Two good resources for suggestions and strategies to help you structure and phrase your question to make it easier for those here to understand your problem and help you work to a solution are: • <https://www.mikeash.com/getting_answers.html> • <https://stackoverflow.com/help/how-to-ask>
2019-03-28T10:09:15.066700
Leana
pythondev_help_Leana_2019-03-28T10:09:15.066700
1,553,767,755.0667
15,496
pythondev
help
Have anyone worked on data deduplication thing?
2019-03-28T10:10:18.067200
Cathi
pythondev_help_Cathi_2019-03-28T10:10:18.067200
1,553,767,818.0672
15,497
pythondev
help
If you have a question, please just ask it. Please do not ask for topic experts; do not DM or ping random users. We cannot begin to answer a question until we actually get a question. <http://sol.gfxile.net/dontask.html|*Asking Questions*>
2019-03-28T10:10:55.067300
Leana
pythondev_help_Leana_2019-03-28T10:10:55.067300
1,553,767,855.0673
15,498
pythondev
help
i want to compare values in two different tables
2019-03-28T10:12:35.067700
Florencio
pythondev_help_Florencio_2019-03-28T10:12:35.067700
1,553,767,955.0677
15,499
pythondev
help
can I not do this: ``` msg_list = Message.objects.filter(status="Accepted") tnx_list = Transaction.objects.get(id) if tnx_list == msg_list.id: tick = "OK" else: tick = "" pd = { 'list': msg_list, 'ticks': tick } ```
2019-03-28T10:13:03.068100
Florencio
pythondev_help_Florencio_2019-03-28T10:13:03.068100
1,553,767,983.0681
15,500
pythondev
help
You can, but not that way
2019-03-28T10:16:19.068600
Clemmie
pythondev_help_Clemmie_2019-03-28T10:16:19.068600
1,553,768,179.0686
15,501
pythondev
help
in you model `message` is a foreign key in `Transaction`, so you reversed the comparison of id. Also `filter()` returns a ``QuerySet` and `get()` returns a model instance. A `QuerySet` is an iterable, so you need to iterate through it to check ids of individual instances
2019-03-28T10:18:14.070400
Clemmie
pythondev_help_Clemmie_2019-03-28T10:18:14.070400
1,553,768,294.0704
15,502
pythondev
help
yeah
2019-03-28T10:28:59.070800
Florencio
pythondev_help_Florencio_2019-03-28T10:28:59.070800
1,553,768,939.0708
15,503
pythondev
help
i iterate through message and output the items
2019-03-28T10:29:33.071400
Florencio
pythondev_help_Florencio_2019-03-28T10:29:33.071400
1,553,768,973.0714
15,504
pythondev
help
Now just discovered I need to differentiate the ones worked on and the ones not worked on
2019-03-28T10:30:07.072300
Florencio
pythondev_help_Florencio_2019-03-28T10:30:07.072300
1,553,769,007.0723
15,505
pythondev
help
So please show that code
2019-03-28T10:30:10.072400
Clemmie
pythondev_help_Clemmie_2019-03-28T10:30:10.072400
1,553,769,010.0724
15,506
pythondev
help
``` def accepted_list(request): msg_list = Message.objects.filter(status="Accepted") pd = { 'list': msg_list } return render(request, 'manageportal/accepted_list.html', pd) ```
2019-03-28T10:31:16.073400
Florencio
pythondev_help_Florencio_2019-03-28T10:31:16.073400
1,553,769,076.0734
15,507
pythondev
help
and please use the snippet feature found with the `+` next to the comment box - it adds line numbers to the code so we can talk more directly
2019-03-28T10:31:30.073800
Clemmie
pythondev_help_Clemmie_2019-03-28T10:31:30.073800
1,553,769,090.0738
15,508
pythondev
help
Ok, so you got rid of the logic. Are you having an issue now?
2019-03-28T10:32:03.074400
Clemmie
pythondev_help_Clemmie_2019-03-28T10:32:03.074400
1,553,769,123.0744
15,509
pythondev
help
no issue with this
2019-03-28T10:32:39.074700
Florencio
pythondev_help_Florencio_2019-03-28T10:32:39.074700
1,553,769,159.0747
15,510
pythondev
help
I just want to check if this particular `id` in `message` exist in `tansaction`
2019-03-28T10:33:43.075500
Florencio
pythondev_help_Florencio_2019-03-28T10:33:43.075500
1,553,769,223.0755
15,511
pythondev
help
that's why I used `get` for transaction cos the `id` is supposed to be once
2019-03-28T10:35:22.076500
Florencio
pythondev_help_Florencio_2019-03-28T10:35:22.076500
1,553,769,322.0765
15,512
pythondev
help
what’s the model relationship between `Message` and `Transaction`?
2019-03-28T10:35:28.076700
Hiroko
pythondev_help_Hiroko_2019-03-28T10:35:28.076700
1,553,769,328.0767
15,513
pythondev
help
transaction has a column 'message' that is a foreignkey
2019-03-28T10:36:17.077400
Florencio
pythondev_help_Florencio_2019-03-28T10:36:17.077400
1,553,769,377.0774
15,514
pythondev
help
```try: transaction = Transaction.objects.get(message_id = id) except Transaction.DoesNotExist as e: # do something with exception ... do something with transaction model```
2019-03-28T10:39:05.079200
Hiroko
pythondev_help_Hiroko_2019-03-28T10:39:05.079200
1,553,769,545.0792
15,515
pythondev
help
okay
2019-03-28T10:39:38.079500
Florencio
pythondev_help_Florencio_2019-03-28T10:39:38.079500
1,553,769,578.0795
15,516
pythondev
help
the `id` part i don't understand
2019-03-28T10:46:16.080100
Florencio
pythondev_help_Florencio_2019-03-28T10:46:16.080100
1,553,769,976.0801
15,517
pythondev
help
it throws exception
2019-03-28T10:50:49.080500
Florencio
pythondev_help_Florencio_2019-03-28T10:50:49.080500
1,553,770,249.0805
15,518
pythondev
help
what exception?
2019-03-28T10:55:23.080900
Clemmie
pythondev_help_Clemmie_2019-03-28T10:55:23.080900
1,553,770,523.0809
15,519
pythondev
help
<@Florencio> if you want help, providing details is pretty important
2019-03-28T10:56:51.081500
Hiroko
pythondev_help_Hiroko_2019-03-28T10:56:51.081500
1,553,770,611.0815
15,520