Remember Larry?
rblog
Remembering the snow
Memories – almost no Xmas at home in 2017
Stuck on the road
Not your everyday first aid kit
After last weekend, running for three days has its drawbacks, damaged toe nails is one of them, and this time I had to use a first aid kit I have not used before. Actually the valentines present I gave Elin a year or two back – the Bosch gsr 10 8-2-li
A bit of warning, but maybe to late anyhow, but Elin felt sick after I had shown her my nail. The 2mm drill made a perfect little hole which let out a lot of pressure, now the nail ain’t that painfull anymore.
The nail to the left was damaged last year when doing Icebug Xperience
Python – gzip has no attribute open
Did try the following
import gzip
f = gzip.open('myfile.gz','rb')
But then got the error
AttributeError: 'module' object has no attribute 'open'
What I really should have done was to read the whole error stack
Traceback (most recent call last):
File "gzip.py", line 1, in module
import gzip
File "d:\test-py\gzip.py", line 13, in
fileHandler = gzip.open(pathToGzFile)
AttributeError: 'module' object has no attribute 'open'module
While testing I had named my file
gzip.py
causing Python to believe that I meant “import the script I am testing”. Renamed the file to testgzip.py and it all works fine (name can be whatever, but do not name the file the same as a module you are importing)
During this I found a nice way to pretty print (pprint) the attributes of a module/object in Python, see StackOverflow
Snowy at home
Sandsjöbacka Trail 2018
Last weekend me and my friend Bendik did participate in the three day sprint tripple run – http://sandsjobackatrail.se/. I have published a run report here https://www.hiul.no/sandsjobacka-trail-en-kickstart-pa-lopesesongen-2018/










