Answer the question
In order to leave comments, you need to log in
Why does it throw an error 'NoneType' object has no attribute 'startswith'?
I want to use code -
import aiohttp
import os
import re
uri = os.getenv("DB_URL")
if uri.startswith("postgres://"):
uri = uri.replace("postgres://", "postgresql://", 1)
DB_URL = 'postgresql://postgres:[email protected]:5432/parser'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question