Since steemit.com disabled their legacy steemd node (https://steemd.steemit.com), your "firstscript.py" is not longer working.
I made an update of your tutorial https://steemit.com/steem/@botsultant/let-s-build-bots-for-steem-part-03-install-steem-python-on-ubuntu-17-10
RE: Learning Python with @felixxx #1: Setup and First Script