141034 (1) [Avatar] Offline
#1
from nlpia.data import kite_text


>>> from nlpia.data import kite_text
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/handlers.py", line 835, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/config.py", line 558, in configure
handler = self.configure_handler(handlers[name])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/config.py", line 731, in configure_handler
result = factory(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/handlers.py", line 818, in __init__
self._connect_unixsocket(address)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/handlers.py", line 846, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

307321 (1) [Avatar] Offline
#2
I have created a PR to address this on OS/X https://github.com/totalgood/nlpia/pull/1 where the domain socket is ‘/var/run/syslog’ rather than where it is on Linux which is ‘/dev/log’ (https://docs.python.org/3/library/logging.handlers.html#sysloghandler)
243895 (1) [Avatar] Offline
#3

Hi,

I have the following error when trying to import the nlpia package using Windows :

from nlpia.data import kite_text, kite_history


AttributeError                            Traceback (most recent call last)
~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\logging\config.py in configure(self)
    557                     try:
--> 558                         handler = self.configure_handler(handlers[name])
    559                         handler.name = name

~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\logging\config.py in configure_handler(self, config)
    730         try:
--> 731             result = factory(**kwargs)
    732         except TypeError as te:

~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\logging\handlers.py in __init__(self, address, facility, socktype)
    810             try:
--> 811                 self._connect_unixsocket(address)
    812             except OSError:

~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\logging\handlers.py in _connect_unixsocket(self, address)
    842             use_socktype = socket.SOCK_DGRAM
--> 843         self.socket = socket.socket(socket.AF_UNIX, use_socktype)
    844         try:

AttributeError: module 'socket' has no attribute 'AF_UNIX'

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
<ipython-input-32-6c4bf3147277> in <module>()
----> 1 from nlpia.data import kite_text, kite_history
      2 # kite_intro = kite_text.lower() # "A kite is traditionally ..."

~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\site-packages\nlpia\data\__init__.py in <module>()
      4 from builtins import *  # noqa
      5 
----> 6 from nlpia.data.loaders import get_data, read_csv, untar, no_tqdm, dropbox_basename, download, download_file, multifile_dataframe  # noqa
      7 
      8 __all__ = [s.strip() for s in 'get_data, read_csv, untar, no_tqdm, dropbox_basename, download, download_file, multifile_dataframe'.split(',')]

~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\site-packages\nlpia\data\loaders.py in <module>()
      8 import json
      9 import requests
---> 10 from nlpia.constants import logging, DATA_PATH, BIGDATA_PATH
     11 
     12 from tqdm import tqdm

~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\site-packages\nlpia\constants.py in <module>()
     55 }
     56 
---> 57 logging.config.dictConfig(LOGGING_CONFIG)
     58 logger = logging.getLogger(__name__)
     59 

~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\logging\config.py in dictConfig(config)
    793 def dictConfig(config):
    794     """Configure logging using a dictionary."""
--> 795     dictConfigClass(config).configure()
    796 
    797 

~\AppData\Local\Continuum\Anaconda3\envs\nlp\lib\logging\config.py in configure(self)
    564                         else:
    565                             raise ValueError('Unable to configure handler '
--> 566                                              '%r: %s' % (name, e))
    567 
    568                 # Now do any that were deferred

ValueError: Unable to configure handler 'logging.handlers.SysLogHandler': module 'socket' has no attribute 'AF_UNIX'