Ran into this error when i ran server
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\core\management\commands\runserver.py", line 133, in inner_run
self.check(display_num_errors=True)
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\core\management\base.py", line 486, in check
all_issues = checks.run_checks(
^^^^^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config
return check_resolver(resolver)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver
return check_method()
^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\urls\resolvers.py", line 519, in check
for pattern in self.url_patterns:
^^^^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\utils\functional.py", line 47, in __get__
res = instance.__dict__[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\urls\resolvers.py", line 738, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\utils\functional.py", line 47, in __get__
res = instance.__dict__[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\urls\resolvers.py", line 731, in urlconf_module
return import_module(self.urlconf_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
# Been having errors with this line, it seems okay but i dont know why it keeps being underlined too
File "C:\Users\username\Desktop\Freelance\object-detect\vehicle_detection_project\urls.py", line 22, in <module>
path('', include('vehicle_detection_app.urls')),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\django\urls\conf.py", line 39, in include
urlconf_module = import_module(urlconf_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\username\Desktop\Freelance\object-detect\vehicle_detection_app\urls.py", line 2, in <module>
from . import views
File "C:\Users\username\Desktop\Freelance\object-detect\vehicle_detection_app\views.py", line 26, in <module>
serialized_graph = fid.read()
^^^^^^^^^^
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\tensorflow\python\lib\io\file_io.py", line 116, in read
self._preread_check()
File "C:\Users\username\Desktop\Freelance\object-detect\venv\Lib\site-packages\tensorflow\python\lib\io\file_io.py", line 77, in _preread_check
self._read_buf = _pywrap_file_io.BufferedInputStream(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: models-master/research/object_detection/inference_graph/frozen_inference_graph.pb : The system cannot find the path specified.
; No such process
i did clone the model here git clone https://github.com/tensorflow/models.git
Hello @JOEL_MIRUNI,
Thank you for using TensorFlow,
According to the error message, In the path where the django server is searching for the graph is relative path to the frozen_inference_graph.pb file. Please ensure that you are present in the working directory as suggested in the tutorials.
Check the integrity of the .pb file with md5sum command to get MD5 sum of the file and verify it with the source of the file.
Also check for the permissions of the file read/write/execute so that it can be accessible to other services.
Thank you.