GithubHelp home page GithubHelp logo

Not recognizing netaddr about px HOT 3 CLOSED

genotrance avatar genotrance commented on July 17, 2024
Not recognizing netaddr

from px.

Comments (3)

genotrance avatar genotrance commented on July 17, 2024

Px checks for netaddr with a simple try/except block:-

try:
    import netaddr
except:
    print("Requires modules netaddr")
    sys.exit()

Can you change that to just import netaddr and share the stack trace? Another alternative would be to run Python and type import netaddr on the prompt to see if it loads as expected.

from px.

82dsoldier avatar 82dsoldier commented on July 17, 2024

If I comment out the try/except, I get this error message:

Traceback (most recent call last):
File "px.py", line 69, in
NOPROXY = netaddr.IPSet([])
NameError: name 'netaddr' is not defined

However, if I run python and type import netaddr, I get no messages at all. I assume that is expected behavior? I'm not a python programmer.

I did type in the "NOPRYX=..." line into the interpreter after doing the import netaddr and it didn't complain, so I assume it's being imported correctly.

from px.

genotrance avatar genotrance commented on July 17, 2024

Makes no sense - how are you running Px? Can you please share the command line? And also the version of Python with the -V flag?

from px.

Related Issues (20)

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.