spookylukey / django-paypal

A pluggable Django application for integrating PayPal Payments Standard or Payments Pro
MIT License
729 stars 208 forks source link

AttributeError for Url and PayPal_wpp_signature #149

Closed Copser closed 7 years ago

Copser commented 8 years ago

Hello,

I have rather unusual errors, AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module' and AttributeError: 'Settings' object has no attribute 'PAYPAL_WPP_SIGNATURE'.

I've just started with django-paypal WPP integration into my project, was following documentation and after initial set-up, I wanted to migrate the db, and Attribute error showed up. I have a secret.py file where I hide all my KEY's, so you can assume that I have put paypal_wpp_user, paypal_wpp_passoword' and 'paypal_wpp_signature inside it, and I'm from secret import * into settings.py, standard stuff I usedjango==1.8.7andpython==3.4.3`.

Can you help me understand how to overcome this, thanks.

Errors copy:

Traceback (most recent call last):
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/core/urlresolvers.py", line 393, in urlconf_module
    return self._urlconf_module
AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/core/management/__init__.py", line 328, in execute
    django.setup()
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/debug_toolbar/apps.py", line 15, in ready
    dt_settings.patch_all()
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/debug_toolbar/settings.py", line 228, in patch_all
    patch_root_urlconf()
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/debug_toolbar/settings.py", line 216, in patch_root_urlconf
    reverse('djdt:render_panel')
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/core/urlresolvers.py", line 549, in reverse
    app_list = resolver.app_dict[ns]
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/core/urlresolvers.py", line 351, in app_dict
    self._populate()
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/core/urlresolvers.py", line 284, in _populate
    for pattern in reversed(self.url_patterns):
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/core/urlresolvers.py", line 401, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/core/urlresolvers.py", line 395, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/petarp/Documents/Projects/SOCIETE_on_GitHub/societe_project/societe/societe/urls.py", line 4, in <module>
    from payments import views
  File "/home/petarp/Documents/Projects/SOCIETE_on_GitHub/societe_project/societe/payments/views.py", line 6, in <module>
    from paypal.pro.views import PayPalPro
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/paypal/pro/views.py", line 12, in <module>
    from paypal.pro.helpers import PayPalWPP, express_endpoint_for_token
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/paypal/pro/helpers.py", line 26, in <module>
    SIGNATURE = settings.PAYPAL_WPP_SIGNATURE
  File "/home/petarp/.virtualenvs/SOCIETE_on_GitHub/lib/python3.4/site-packages/django/conf/__init__.py", line 49, in __getattr__
    return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'PAYPAL_WPP_SIGNATURE'
spookylukey commented 8 years ago

I have no idea without being able to see the project, but note that paypal_wpp_signature is not the same as the required PAYPAL_WPP_SIGNATURE. (Python is case sensitive)

spookylukey commented 7 years ago

Without further info, there is nothing I can do to help here, and it seems unlikely this is an error in django-paypal.