Comments (9)
@Barna-154 it works for me after trying it just now. I'm not sure how you have things setup.
from django.
hie i have restarted setting up a new app and environment but the problem still persists.
File "/mnt/c/Users/BR1GH/Desktop/ipinfo/ip/lib/python3.8/site-packages/django/utils/module_loading.py", line 17, in import_string
module = import_module(module_path)
File "/usr/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 "/mnt/c/Users/BR1GH/Desktop/ipinfo/ipinfo/ipinfo/wsgi.py", line 16, in
application = get_wsgi_application()
File "/mnt/c/Users/BR1GH/Desktop/ipinfo/ip/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
return WSGIHandler()
File "/mnt/c/Users/BR1GH/Desktop/ipinfo/ip/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 127, in init
self.load_middleware()
File "/mnt/c/Users/BR1GH/Desktop/ipinfo/ip/lib/python3.8/site-packages/django/core/handlers/base.py", line 58, in load_middleware
mw_instance = middleware(adapted_handler)
File "/mnt/c/Users/BR1GH/Desktop/ipinfo/ip/lib/python3.8/site-packages/ipinfo_django/middleware.py", line 19, in init
self.ipinfo = ipinfo.getHandler(ipinfo_token, **ipinfo_settings)
AttributeError: module 'ipinfo' has no attribute 'getHandler'
from django.
I'm not sure how to help you @Barna-154 , it just seems like an environment issue of some kind, there's no way that module doesn't have the getHandler
attribute if things were installed correctly.
Can you copy and paste the output of this file:
/mnt/c/Users/BR1GH/Desktop/ipinfo/ip/lib/python3.8/site-packages/ipinfo/__init__.py
from django.
@UmanShahzad that is the output
from .handler import Handler
def getHandler(access_token=None, **kwargs):
"""Create and return Handler object."""
return Handler(access_token, **kwargs)
from django.
@Barna-154 so the getHandler
is there. The issue is then really specific to your codebase/environment, and I likely can't help you further.
from django.
how is your envirionment setup so that i can work on creating a similar one
from django.
I use Linux & just create a virtual environment with virtualenv venv/
in the folder of the project I'm working on (and then add venv/
to my .gitignore
). I don't use an IDE which integrates strongly with the environment itself, so if I want to run code I do it manually via the command line after jumping into the environment, e.g.:
# just a simple example
$ pip install virtualenv
$ virtualenv venv/
$ . venv/bin/activate
(venv) $ pip install requirements.txt
(venv) $ python entry.py
from django.
hello @UmanShahzad i have changed my machine and setup a new environment, it is up and running now. thank you for your help and patience.
from django.
You're welcome @Barna-154 , and I'm happy to hear it works now!
from django.
Related Issues (13)
- `` HOT 2
- requests.exceptions.HTTPError: 403 Client Error: Forbidden HOT 4
- Async support in Django 3.0+ HOT 1
- Add optional IP selection handler HOT 1
- unresolved import 'ipinfo' HOT 4
- CSP Blocking requests HOT 2
- django.core.exceptions.ImproperlyConfigured: WSGI application 'Mysite.wsgi.application' could not be loaded; Error importing module. HOT 1
- asgiref version conflict with Django 4.0.7+ HOT 5
- Django runserver does not load when ipinfo middleware added in settings file HOT 4
- request.ipinfo.ip return the server public ip instead of the client public ip HOT 1
- Clarify current error behavior in docs and improve error handling HOT 1
- หัวข้อ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django.