You can solve this by setting read permissions with os.chmod following the code in this answer
os.chmod