curved-farmer-66180
07/30/2022, 6:57 AM ./pants run payhere/app_services/hero_cx/manage.py -- runserver
Traceback (most recent call last):
File "/Users/szto/.pyenv/versions/3.7.12/lib/python3.7/logging/config.py", line 384, in resolve
found = self.importer(used)
ModuleNotFoundError: No module named 'log_request_id'
The above exception was the direct cause of the following exception:
I could not see the 3rd party lib from dependencies.
./pants dependencies payhere/app_services/hero_cx/manage.py
payhere/app_services/hero_cx/__init__.py:lib
payhere/app_services/hero_cx/gunicorn.py:lib
payhere/app_services/hero_cx/manage.py:lib
payhere/app_services/hero_cx/settings.py:lib
payhere/app_services/hero_cx/urls.py:lib
payhere/app_services/util/app_service.py
payhere/hero_cx/__init__.py
payhere/hero_cx/apps.py
payhere/hero_cx/swagger.py
payhere/sellers/__init__.py
payhere/sellers/apps.py
payhere/sellers/forms.py
payhere/sellers/signals.py
payhere/sellers/swagger.py
payhere/sellers/tasks.py
payhere/sellers/views.py
Here is my BUILD file
python_sources(
name="lib",
dependencies=[
"payhere/hero_cx",
"payhere/sellers"
]
)
pex_binary(
name="gunicorn",
entry_point="gunicorn.py",
dependencies=[
":lib",
],
restartable=True,
)
pex_binary(
name="manage",
entry_point="manage.py",
dependencies=[
":lib",
],
restartable=True,
)
curved-farmer-66180
07/30/2022, 11:49 PMpython_sources(name="lib", dependencies=[
"payhere/hero_cx",
"payhere/sellers",
"//:requirements",
]
)
I think this might not be the way since I need to make all the dependencies to be a cache. Is that right?
Do I need to define dependencies instead like above?
I put string_imports for settings but not work for now.
[python-infer]
string_imports = true