Forums

New in Pythonanywhere

I have a telegram bot. I can run it on my PC without any problem. But when I am trying to run it here, it shows

File "/home/wasi006/D:/Telegram Bot/admin_panel.py", line 2, in <module>
    from firebase_utils import db
  File "/home/wasi006/D:/Telegram Bot/firebase_utils.py", line 7, in <module>
    cred = credentials.Certificate(os.getenv("FIREBASE_CREDENTIALS_PATH"))
  File "/home/wasi006/.local/lib/python3.10/site-packages/firebase_admin/credentials.py", line 102, in __init__
    raise ValueError(
ValueError: Invalid certificate argument: "None". Certificate argument must be a file path, or a dict containing the parsed file contents.

What can I do?

[edit by admin: formatting]

It looks like the result of os.getenv("FIREBASE_CREDENTIALS_PATH") is None. Are you setting that environment variable anywhere?