longclawshop / longclaw

A shop for Wagtail CMS
MIT License
396 stars 83 forks source link

python3 manage.py makemigrations home catalog #324

Open claytonseraphin opened 4 years ago

claytonseraphin commented 4 years ago

ISSUE_TEMPLATE

Description

Traceback (most recent call last): File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/utils.py", line 66, in getitem return self._engines[alias] KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/backends/django.py", line 121, in get_package_libraries module = import_module(entry[1]) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/longclaw/checkout/templatetags/longclawcheckout_tags.py", line 2, in from longclaw.checkout.utils import GATEWAY File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/longclaw/checkout/utils.py", line 4, in from ipware.ip import get_real_ip ImportError: cannot import name 'get_real_ip' from 'ipware.ip' (/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/ipware/ip.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "manage.py", line 11, in execute_from_command_line(sys.argv) File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/core/management/init.py", line 401, in execute_from_command_line utility.execute() File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/core/management/init.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/core/management/base.py", line 328, in run_from_argv self.execute(*args, cmd_options) File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/core/management/base.py", line 366, in execute self.check() File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/core/management/base.py", line 392, in check all_issues = self._run_checks( File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/core/management/base.py", line 382, in _run_checks return checks.run_checks(kwargs) File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/contrib/admin/checks.py", line 76, in check_dependencies for engine in engines.all(): File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/utils.py", line 90, in all return [self[alias] for alias in self] File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/utils.py", line 90, in return [self[alias] for alias in self] File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/utils.py", line 81, in getitem engine = engine_cls(params) File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/backends/django.py", line 25, in init options['libraries'] = self.get_templatetag_libraries(libraries) File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries libraries = get_installed_libraries() File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries for name in get_package_libraries(pkg): File "/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/django/template/backends/django.py", line 123, in get_package_libraries raise InvalidTemplateLibrary( django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'longclaw.checkout.templatetags.longclawcheckout_tags': cannot import name 'get_real_ip' from 'ipware.ip' (/Users/clayton/Documents/Work/market/market/lib/python3.8/site-packages/ipware/ip.py)

jeffykle commented 4 years ago

I think it's related to the latest release of django-ipware. I know this is not recommended but you may try modifying the site package:

... \Lib\site-packages\longclaw\checkout\utils.py:

4: from ipware.ip import get_client_ip as get_real_ip
payamsaremi commented 4 years ago

any solutions for this? im getting a similar error while doing python manage.py makemigrations home catalog

Traceback (most recent call last): File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/utils.py", line 66, in getitem return self._engines[alias] KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/backends/django.py", line 121, in get_package_libraries module = import_module(entry[1]) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/longclaw/checkout/templatetags/longclawcheckout_tags.py", line 2, in from longclaw.checkout.utils import GATEWAY File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/longclaw/checkout/utils.py", line 4, in from ipware.ip import get_real_ip ImportError: cannot import name 'get_real_ip' from 'ipware.ip' (/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/ipware/ip.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "manage.py", line 11, in execute_from_command_line(sys.argv) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/core/management/init.py", line 401, in execute_from_command_line utility.execute() File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/core/management/init.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv self.execute(*args, **cmd_options) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/core/management/base.py", line 368, in execute self.check() File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/core/management/base.py", line 392, in check all_issues = checks.run_checks( File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/core/checks/registry.py", line 70, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config return check_resolver(resolver) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver return check_method() File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/urls/resolvers.py", line 408, in check for pattern in self.url_patterns: File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/urls/resolvers.py", line 589, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/urls/resolvers.py", line 582, in urlconf_module return import_module(self.urlconf_name) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/Users/lantos/test-site/my_project/my_project/urls.py", line 7, in from wagtail.admin import urls as wagtailadmin_urls File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/wagtail/admin/urls/init.py", line 104, in path(f"sprite-{get_sprite_hash()}/", home.sprite, name="wagtailadmin_sprite"), File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/wagtail/admin/urls/init.py", line 95, in get_sprite_hash content = str(home.sprite(None).content, "utf-8") File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/wagtail/admin/views/home.py", line 227, in sprite return HttpResponse(icons()) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/wagtail/admin/views/home.py", line 222, in icons _icons_html = render_to_string("wagtailadmin/shared/icons.html", {'icons': all_icons}) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/loader.py", line 61, in render_to_string template = get_template(template_name, using=using) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/loader.py", line 12, in get_template engines = _engine_list(using) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/loader.py", line 66, in _engine_list return engines.all() if using is None else [engines[using]] File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/utils.py", line 90, in all return [self[alias] for alias in self] File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/utils.py", line 90, in return [self[alias] for alias in self] File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/utils.py", line 81, in getitem engine = engine_cls(params) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/backends/django.py", line 25, in init options['libraries'] = self.get_templatetag_libraries(libraries) File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries libraries = get_installed_libraries() File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries for name in get_package_libraries(pkg): File "/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/django/template/backends/django.py", line 123, in get_package_libraries raise InvalidTemplateLibrary( django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'longclaw.checkout.templatetags.longclawcheckout_tags': cannot import name 'get_real_ip' from 'ipware.ip' (/Users/lantos/.local/share/virtualenvs/test-site-Hb7R4Tit/lib/python3.8/site-packages/ipware/ip.py)

shivkashyap commented 3 years ago

Any solution for this issue? I am getting the same error

jeffykle commented 3 years ago

I think your best option would be to try and fork. I abandoned this and went with wagtail alone, implenting a custom shop.

shivkashyap commented 3 years ago

I think your best option would be to try and fork. I abandoned this and went with wagtail alone, implenting a custom shop.

Thanks