Giter Site home page Giter Site logo

Comments (9)

UmanShahzad avatar UmanShahzad commented on May 22, 2024

@Barna-154 it works for me after trying it just now. I'm not sure how you have things setup.

from django.

Barna-154 avatar Barna-154 commented on May 22, 2024

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.

UmanShahzad avatar UmanShahzad commented on May 22, 2024

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.

Barna-154 avatar Barna-154 commented on May 22, 2024

@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.

UmanShahzad avatar UmanShahzad commented on May 22, 2024

@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.

Barna-154 avatar Barna-154 commented on May 22, 2024

how is your envirionment setup so that i can work on creating a similar one

from django.

UmanShahzad avatar UmanShahzad commented on May 22, 2024

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.

Barna-154 avatar Barna-154 commented on May 22, 2024

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.

UmanShahzad avatar UmanShahzad commented on May 22, 2024

You're welcome @Barna-154 , and I'm happy to hear it works now!

from django.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.