Почему выдаёт ошибку 'NoneType' object has no attribute 'startswith'
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:123123@localhost:5432/parser'
А он мне ошибку -
Traceback (most recent call last):
File "C:/Users/sinto/PycharmProjects/OLX/main.py", line 12, in <module>
import config
File "C:\Users\sinto\PycharmProjects\OLX\config.py", line 6, in <module>
if uri.startswith("postgres://"):
AttributeError: 'NoneType' object has no attribute 'startswith'
