Skip to content

550 error on Chapter 2 notebook 01_build_itch_order_book #14

@yahoyoungho

Description

@yahoyoungho

I have installed all packages from an updated version from packtpublishing and I am getting an erorr:

Downloading... ftp://emi.nasdaq.com/ITCH/Nasdaq_ITCH/03272019.NASDAQ_ITCH50.gz
---------------------------------------------------------------------------
error_perm                                Traceback (most recent call last)
~\anaconda3\envs\ml4trading\lib\urllib\request.py in ftp_open(self, req)
   1564         try:
-> 1565             fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout)
   1566             type = file and 'I' or 'D'

~\anaconda3\envs\ml4trading\lib\urllib\request.py in connect_ftp(self, user, passwd, host, port, dirs, timeout)
   1586         return ftpwrapper(user, passwd, host, port, dirs, timeout,
-> 1587                           persistent=False)
   1588 

~\anaconda3\envs\ml4trading\lib\urllib\request.py in __init__(self, user, passwd, host, port, dirs, timeout, persistent)
   2407         try:
-> 2408             self.init()
   2409         except:

~\anaconda3\envs\ml4trading\lib\urllib\request.py in init(self)
   2419         _target = '/'.join(self.dirs)
-> 2420         self.ftp.cwd(_target)
   2421 

~\anaconda3\envs\ml4trading\lib\ftplib.py in cwd(self, dirname)
    630         cmd = 'CWD ' + dirname
--> 631         return self.voidcmd(cmd)
    632 

~\anaconda3\envs\ml4trading\lib\ftplib.py in voidcmd(self, cmd)
    277         self.putcmd(cmd)
--> 278         return self.voidresp()
    279 

~\anaconda3\envs\ml4trading\lib\ftplib.py in voidresp(self)
    250         """Expect a response beginning with '2'."""
--> 251         resp = self.getresp()
    252         if resp[:1] != '2':

~\anaconda3\envs\ml4trading\lib\ftplib.py in getresp(self)
    245         if c == '5':
--> 246             raise error_perm(resp)
    247         raise error_proto(resp)

error_perm: 550 The system cannot find the file specified. 

During handling of the above exception, another exception occurred:

URLError                                  Traceback (most recent call last)
<ipython-input-6-8ab12e3a4ec2> in <module>
----> 1 file_name = may_be_download(urljoin(FTP_URL, SOURCE_FILE))
      2 date = file_name.name.split('.')[0]

<ipython-input-4-4c71a35e1865> in may_be_download(url)
      7     if not filename.exists():
      8         print('Downloading...', url)
----> 9         urlretrieve(url, filename)
     10     unzipped = data_path / (filename.stem + '.bin')
     11     if not (data_path / unzipped).exists():

~\anaconda3\envs\ml4trading\lib\urllib\request.py in urlretrieve(url, filename, reporthook, data)
    246     url_type, path = splittype(url)
    247 
--> 248     with contextlib.closing(urlopen(url, data)) as fp:
    249         headers = fp.info()
    250 

~\anaconda3\envs\ml4trading\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
    221     else:
    222         opener = _opener
--> 223     return opener.open(url, data, timeout)
    224 
    225 def install_opener(opener):

~\anaconda3\envs\ml4trading\lib\urllib\request.py in open(self, fullurl, data, timeout)
    524             req = meth(req)
    525 
--> 526         response = self._open(req, data)
    527 
    528         # post-process response

~\anaconda3\envs\ml4trading\lib\urllib\request.py in _open(self, req, data)
    542         protocol = req.type
    543         result = self._call_chain(self.handle_open, protocol, protocol +
--> 544                                   '_open', req)
    545         if result:
    546             return result

~\anaconda3\envs\ml4trading\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args)
    502         for handler in handlers:
    503             func = getattr(handler, meth_name)
--> 504             result = func(*args)
    505             if result is not None:
    506                 return result

~\anaconda3\envs\ml4trading\lib\urllib\request.py in ftp_open(self, req)
   1581         except ftplib.all_errors as exp:
   1582             exc = URLError('ftp error: %r' % exp)
-> 1583             raise exc.with_traceback(sys.exc_info()[2])
   1584 
   1585     def connect_ftp(self, user, passwd, host, port, dirs, timeout):

~\anaconda3\envs\ml4trading\lib\urllib\request.py in ftp_open(self, req)
   1563             dirs = dirs[1:]
   1564         try:
-> 1565             fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout)
   1566             type = file and 'I' or 'D'
   1567             for attr in attrs:

~\anaconda3\envs\ml4trading\lib\urllib\request.py in connect_ftp(self, user, passwd, host, port, dirs, timeout)
   1585     def connect_ftp(self, user, passwd, host, port, dirs, timeout):
   1586         return ftpwrapper(user, passwd, host, port, dirs, timeout,
-> 1587                           persistent=False)
   1588 
   1589 class CacheFTPHandler(FTPHandler):

~\anaconda3\envs\ml4trading\lib\urllib\request.py in __init__(self, user, passwd, host, port, dirs, timeout, persistent)
   2406         self.keepalive = persistent
   2407         try:
-> 2408             self.init()
   2409         except:
   2410             self.close()

~\anaconda3\envs\ml4trading\lib\urllib\request.py in init(self)
   2418         self.ftp.login(self.user, self.passwd)
   2419         _target = '/'.join(self.dirs)
-> 2420         self.ftp.cwd(_target)
   2421 
   2422     def retrfile(self, file, type):

~\anaconda3\envs\ml4trading\lib\ftplib.py in cwd(self, dirname)
    629             dirname = '.'  # does nothing, but could return error
    630         cmd = 'CWD ' + dirname
--> 631         return self.voidcmd(cmd)
    632 
    633     def size(self, filename):

~\anaconda3\envs\ml4trading\lib\ftplib.py in voidcmd(self, cmd)
    276         """Send a command and expect a response beginning with '2'."""
    277         self.putcmd(cmd)
--> 278         return self.voidresp()
    279 
    280     def sendport(self, host, port):

~\anaconda3\envs\ml4trading\lib\ftplib.py in voidresp(self)
    249     def voidresp(self):
    250         """Expect a response beginning with '2'."""
--> 251         resp = self.getresp()
    252         if resp[:1] != '2':
    253             raise error_reply(resp)

~\anaconda3\envs\ml4trading\lib\ftplib.py in getresp(self)
    244             raise error_temp(resp)
    245         if c == '5':
--> 246             raise error_perm(resp)
    247         raise error_proto(resp)
    248 

URLError: <urlopen error ftp error: error_perm('550 The system cannot find the file specified. ',)>

seems like the url changed but I am not sure where I can get the updated one from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions