ModuleNotFoundError: No module named 'blockonomics'

Helllo
I am currently creating an ecommerce in python django, when i try to follow the source code for integrating payment of bitcoin . It gives me the error
ModuleNotFoundError: No module named ‘blockonomics’

How do i fix this problem

Is it possible to share the code snippet? Blockonomics does not have a python package maybe you missed something?

PS C:\Users\Manoj\Desktop\main\demo-ecommerce> python manage.py runserver
Watching for file changes with StatReloader
Performing system checks…

Exception in thread django-main-thread:
Traceback (most recent call last):
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\threading.py”, line 1038, in _bootstrap_inner
self.run()
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\threading.py”, line 975, in run
self._target(*self._args, **self.kwargs)
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\utils\autoreload.py”, line 64, in wrapper
fn(*args, **kwargs)
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\commands\runserver.py”, line 134, in inner_run
self.check(display_num_errors=True)
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py”, line 475, in check
all_issues = checks.run_checks(
^^^^^^^^^^^^^^^^^^
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\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\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\urls.py”, line 14, in check_url_config
return check_resolver(resolver)
^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\urls.py”, line 24, in check_resolver
return check_method()
^^^^^^^^^^^^^^
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\resolvers.py”, line 494, in check
for pattern in self.url_patterns:
^^^^^^^^^^^^^^^^^
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\utils\functional.py”, line 57, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\resolvers.py”, line 715, in url_patterns
patterns = getattr(self.urlconf_module, “urlpatterns”, self.urlconf_module)
^^^^^^^^^^^^^^^^^^^
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\utils\functional.py”, line 57, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File “C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\resolvers.py”, line 708, in urlconf_module
return import_module(self.urlconf_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Manoj\AppData\Local\Programs\Python\Python311\Lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1206, in _gcd_import
File “”, line 1178, in _find_and_load
File “”, line 1128, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1206, in _gcd_import
File “”, line 1178, in _find_and_load
File “”, line 1142, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘blockonomics’

Hey,
So based on this, there are two possible scenarios why this is happening:

  1. You’re using unsupported python version (Python 3.11) for Django 3.1 (See Here: https://docs.djangoproject.com/en/4.1/releases/3.1/#python-compatibility), try switching to Python 3.9 and see if issue is resolved.
  2. You might have renamed blockonomics folder to something else, due to which it is unable to find it, you should change the references of blockonomics.urls, blockonomics.asgi, blockonomics.wsgi, etc to folder_name.urls, folder_name.asgi, etc, where folder_name is the name of folder containing root URLs and/or settings.py file.

I’ve tried running it in Python 3.9 and it works fine, Let me know if this helps.

P.S. I’m using https://github.com/blockonomics/Django-Image-Store as a reference to what you’re trying to setup.

Ayush,

Hi, I need some help getting my blockonomics payment api to update (message) the buyer via telegram after the store receives buyer funds. The api generates the payment link, but after payment it does not update the buyer that funds were received.

Any idea what the problem is?

Here is the Blockonomics API: Blockchain API | Bitcoin API - Blockonomics

Thanks

Hi @user420,

Are you talking about the greed bot (GitHub - DarrenWestwood/greed: A customizable Telegram shop bot that accepts bitcoin payments) or something else?

Yes I was referring to the greed bot and linking the api correctly.
The dev has resolved it. Thank you for responding.

Great! Happy to help!