Giter Club home page Giter Club logo

ouilookup's Issues

Import statement changing between versions and python 3.6 incompatibility

The module name might have changed from 0.2.4 to 0.3.1 so the import statement went from:
from OuiLookup import OuiLookup to from ouilookup import OuiLookup

The 0.3.1 version also throws the following error with Python 3.6:

  File "C:\Python36\lib\site-packages\ouilookup\__init__.py", line 23, in <module>
    from .main import OuiLookup  # noqa: E402
  File "<fstring>", line 1
    (expression=)
               ^
SyntaxError: invalid syntax

Possibly a newer string formatting method that's not compatible with 3.6 according to https://stackoverflow.com/questions/49582183/pythonl-invalid-syntax-file-fstring-line-1

OuiLookupException: Unable to download from data source

Script:

from ouilookup import OuiLookup

OuiLookup().query('00:00:aa:00:00:00')
OuiLookup().query(['00:00:01:00:00:00','00-00-10-00-00-00','000011000000'])
OuiLookup().update()
OuiLookup().status()

Output:

Traceback (most recent call last):
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 1344, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\http\client.py", line 1336, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\http\client.py", line 1382, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\http\client.py", line 1331, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\http\client.py", line 1091, in _send_output
    self.send(msg)
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\http\client.py", line 1035, in send
    self.connect()
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\http\client.py", line 1477, in connect
    self.sock = self._context.wrap_socket(self.sock,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1042, in _create
    self.do_handshake()
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1320, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\site-packages\ouilookup\main.py", line 83, in update
    urllib.request.urlretrieve(__data_source_url__, source_data_file)
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 240, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
                            ^^^^^^^^^^^^^^^^^^
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 215, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 515, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 532, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 1392, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 1347, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\BUZZARD\Desktop\test.py", line 7, in <module>
    OuiLookup().update()
  File "C:\Users\BUZZARD\AppData\Local\Programs\Python\Python312\Lib\site-packages\ouilookup\main.py", line 85, in update
    raise OuiLookupException(f"Unable to download from data source {str(e)}")
ouilookup.exceptions.OuiLookupException: Unable to download from data source <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)>

C:\Users\BUZZARD\Desktop>

Using a fresh new Windows 10 VM.

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.