Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ValueError: Couldn't import source code string cannot contain null bytes

Open
#673 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
firebase, python

Research direction

Reproduce the Python 3.10 import with Firebase Auth 6.1.0, starting at firebase_admin/init.py and credentials.py, then follow the traceback through google.auth.transport.requests and requests/packages.py. Determine why importing firebase_admin.auth produces the null-byte ValueError and verify that the import completes without the reported traceback.

Written by the indexing model from the issue text.

Description

needs-triage
Python 3.10
Firebase_auth 6.1.0

If I import from firebase_admin import auth I get this error:

momo-api-worker-1  | During handling of the above exception, another exception occurred:
momo-api-worker-1  | 
momo-api-worker-1  | Traceback (most recent call last):
momo-api-worker-1  |   File "/usr/local/bin/celery", line 8, in <module>
momo-api-worker-1  |     sys.exit(main())
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/__main__.py", line 16, in main
momo-api-worker-1  |     _main()
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/bin/celery.py", line 322, in main
momo-api-worker-1  |     cmd.execute_from_commandline(argv)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/bin/celery.py", line 499, in execute_from_commandline
momo-api-worker-1  |     super(CeleryCommand, self).execute_from_commandline(argv)))
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/bin/base.py", line 289, in execute_from_commandline
momo-api-worker-1  |     argv = self.setup_app_from_commandline(argv)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/bin/base.py", line 509, in setup_app_from_commandline
momo-api-worker-1  |     self.app = self.find_app(app)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/bin/base.py", line 531, in find_app
momo-api-worker-1  |     return find_app(app, symbol_by_name=self.symbol_by_name)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/app/utils.py", line 373, in find_app
momo-api-worker-1  |     sym = symbol_by_name(app, imp=imp)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/bin/base.py", line 534, in symbol_by_name
momo-api-worker-1  |     return imports.symbol_by_name(name, imp=imp)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/kombu/utils/imports.py", line 59, in symbol_by_name
momo-api-worker-1  |     reraise(ValueError,
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/vine/five.py", line 194, in reraise
momo-api-worker-1  |     raise value.with_traceback(tb)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/kombu/utils/imports.py", line 57, in symbol_by_name
momo-api-worker-1  |     module = imp(module_name, package=package, **kwargs)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/celery/utils/imports.py", line 111, in import_from_cwd
momo-api-worker-1  |     return imp(module, package=package)
momo-api-worker-1  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
momo-api-worker-1  |     return _bootstrap._gcd_import(name[level:], package, level)
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
momo-api-worker-1  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
momo-api-worker-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
momo-api-worker-1  |   File "/app/worker/__init__.py", line 1, in <module>
momo-api-worker-1  |     from .worker import celery
momo-api-worker-1  |   File "/app/worker/worker.py", line 5, in <module>
momo-api-worker-1  |     from container import init_container
momo-api-worker-1  |   File "/app/container.py", line 16, in <module>
momo-api-worker-1  |     from services.auth_service import AuthService
momo-api-worker-1  |   File "/app/services/auth_service.py", line 9, in <module>
momo-api-worker-1  |     from firebase_admin import auth
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/firebase_admin/__init__.py", line 21, in <module>
momo-api-worker-1  |     from firebase_admin import credentials
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/firebase_admin/credentials.py", line 21, in <module>
momo-api-worker-1  |     from google.auth.transport import requests
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/google/auth/transport/requests.py", line 26, in <module>
momo-api-worker-1  |     import requests
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/requests/__init__.py", line 147, in <module>
momo-api-worker-1  |     from . import packages, utils
momo-api-worker-1  |   File "/usr/local/lib/python3.10/site-packages/requests/packages.py", line 16, in <module>
momo-api-worker-1  |     locals()[package] = __import__(package)
momo-api-worker-1  | ValueError: Couldn't import 'worker.worker.celery': source code string cannot contain null bytes
momo-api-worker-1 exited with code 1
Dominant language
Python
Stars
1.2k
Forks
359
Avg merge
3d 9h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-python

All issues in firebase/firebase-admin-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.