You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within my write_post() implementation, the call resp.json() in the print() returns a list of the previous (in my case) three published items but not the new post that the write_post() was to create. I ran this the original project code using both uplink version 0.4.0 and uplink version 0.9.1 with the same results. I have double checked the source code with the code posted in github. The console output is provided below. Any assistance is appreciated.
C:\Users\rbern\PycharmProjects\ScrapyPractice2\venv\Scripts\python.exe C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev\pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 52869 --file C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py
pydev debugger: process 8784 is connecting
Connected to pydev debugger (build 201.6668.115)
What would you like to do next?
[w]rite a post or [r]ead them?
[1,231 views] Easy Breezy Python HTTP Clients
[10 views] Introducing Requests for Python
[100 views] PyCharm, the Best IDE for Python
Which number to view? Details for selected_post: c7081102-e2c9-41ec-8b79-adc1f3469d91
Title: Easy Breezy Python HTTP Clients
Written: 2017-02-14
Content: So maybe you've heard about Requests...
What would you like to do next?
[w]rite a post or [r]ead them?Title: Body contents: view count (int):
Traceback (most recent call last):
File "C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev\pydevd.py", line 1438, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 58, in
main()
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 12, in main
write_post()
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 53, in write_post
print("Created new post successfully: {}".format(resp.json().get('id')))
AttributeError: 'list' object has no attribute 'get'
Process finished with exit code -1
The text was updated successfully, but these errors were encountered:
It's frustrating. The reason the URL had to be changed is Let's Encrypt stopped creating certs for domains_with_underscores.site.com. Fine, but they originally did so they should have at least grandfathered in some domains. There is a redirect for http://consumer_services_api.talkpython.fm/ to the new URL https://consumerservicesapi.talkpython.fm but once browsers know about the SSL version, they won't forget. It does redirect OK in code, but not in the browser.
Long story short, glad you're up and running again.
Here are two bits of info for anyone who runs across this later searching the repo for help. Why does it have to be this way? A cascading chain of annoyances is why we are even talking about this. :)
Within my write_post() implementation, the call resp.json() in the print() returns a list of the previous (in my case) three published items but not the new post that the write_post() was to create. I ran this the original project code using both uplink version 0.4.0 and uplink version 0.9.1 with the same results. I have double checked the source code with the code posted in github. The console output is provided below. Any assistance is appreciated.
C:\Users\rbern\PycharmProjects\ScrapyPractice2\venv\Scripts\python.exe C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev\pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 52869 --file C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py
pydev debugger: process 8784 is connecting
Connected to pydev debugger (build 201.6668.115)
What would you like to do next?
[w]rite a post or [r]ead them?
Which number to view? Details for selected_post: c7081102-e2c9-41ec-8b79-adc1f3469d91
Title: Easy Breezy Python HTTP Clients
Written: 2017-02-14
Content: So maybe you've heard about Requests...
What would you like to do next?
[w]rite a post or [r]ead them?Title: Body contents: view count (int):
Traceback (most recent call last):
File "C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev\pydevd.py", line 1438, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 58, in
main()
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 12, in main
write_post()
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 53, in write_post
print("Created new post successfully: {}".format(resp.json().get('id')))
AttributeError: 'list' object has no attribute 'get'
Process finished with exit code -1
The text was updated successfully, but these errors were encountered: