`---------------------------------------------------------------------------
UnexpectedSignatureError Traceback (most recent call last)
Cell In[5], line 9
5 url = f"https://download.companieshouse.gov.uk/Accounts_Bulk_Data-2024-01-20.zip"
6 with
7 httpx.stream('GET', url) as r,
8 stream_read_xbrl_zip(r.iter_bytes(chunk_size=65536)) as (columns, rows):
----> 9 df = pd.DataFrame(rows, columns=columns)
10 if isinstance(df, pd.DataFrame):
11 df1 = df
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\frame.py:832, in DataFrame.init(self, data, index, columns, dtype, copy)
830 data = np.asarray(data)
831 else:
--> 832 data = list(data)
833 if len(data) > 0:
834 if is_dataclass(data[0]):
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_read_xbrl.py:556, in (.0)
553 yield queue.popleft().result()
555 with ProcessPoolExecutor(max_workers=num_workers) as executor:
--> 556 yield _COLUMNS, (
557 row + (zip_url,)
558 for results in imap(executor, _xbrl_to_rows, ((name.decode(), b''.join(chunks)) for name, _, chunks in stream_unzip(zip_bytes_iter)))
559 for row in results
560 )
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_read_xbrl.py:546, in stream_read_xbrl_zip..imap(executor, func, param_iterables)
545 def imap(executor, func, param_iterables):
--> 546 for params in param_iterables:
547 if len(queue) == num_workers:
548 yield queue.popleft().result()
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_read_xbrl.py:558, in (.0)
553 yield queue.popleft().result()
555 with ProcessPoolExecutor(max_workers=num_workers) as executor:
556 yield _COLUMNS, (
557 row + (zip_url,)
--> 558 for results in imap(executor, _xbrl_to_rows, ((name.decode(), b''.join(chunks)) for name, _, chunks in stream_unzip(zip_bytes_iter)))
559 for row in results
560 )
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_unzip.py:460, in stream_unzip(zipfile_chunks, password, chunk_size, allow_zip64)
457 else:
458 raise UnexpectedSignatureError(signature)
--> 460 for file_name, file_size, unzipped_chunks in all():
461 yield file_name, file_size, unzipped_chunks
462 for _ in unzipped_chunks:
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_unzip.py:458, in stream_unzip..all()
456 break
457 else:
--> 458 raise UnexpectedSignatureError(signature)
UnexpectedSignatureError: b'<htm'`
I am getting this error
`---------------------------------------------------------------------------
UnexpectedSignatureError Traceback (most recent call last)
Cell In[5], line 9
5 url = f"https://download.companieshouse.gov.uk/Accounts_Bulk_Data-2024-01-20.zip"
6 with
7 httpx.stream('GET', url) as r,
8 stream_read_xbrl_zip(r.iter_bytes(chunk_size=65536)) as (columns, rows):
----> 9 df = pd.DataFrame(rows, columns=columns)
10 if isinstance(df, pd.DataFrame):
11 df1 = df
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\frame.py:832, in DataFrame.init(self, data, index, columns, dtype, copy)
830 data = np.asarray(data)
831 else:
--> 832 data = list(data)
833 if len(data) > 0:
834 if is_dataclass(data[0]):
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_read_xbrl.py:556, in (.0)
553 yield queue.popleft().result()
555 with ProcessPoolExecutor(max_workers=num_workers) as executor:
--> 556 yield _COLUMNS, (
557 row + (zip_url,)
558 for results in imap(executor, _xbrl_to_rows, ((name.decode(), b''.join(chunks)) for name, _, chunks in stream_unzip(zip_bytes_iter)))
559 for row in results
560 )
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_read_xbrl.py:546, in stream_read_xbrl_zip..imap(executor, func, param_iterables)
545 def imap(executor, func, param_iterables):
--> 546 for params in param_iterables:
547 if len(queue) == num_workers:
548 yield queue.popleft().result()
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_read_xbrl.py:558, in (.0)
553 yield queue.popleft().result()
555 with ProcessPoolExecutor(max_workers=num_workers) as executor:
556 yield _COLUMNS, (
557 row + (zip_url,)
--> 558 for results in imap(executor, _xbrl_to_rows, ((name.decode(), b''.join(chunks)) for name, _, chunks in stream_unzip(zip_bytes_iter)))
559 for row in results
560 )
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_unzip.py:460, in stream_unzip(zipfile_chunks, password, chunk_size, allow_zip64)
457 else:
458 raise UnexpectedSignatureError(signature)
--> 460 for file_name, file_size, unzipped_chunks in all():
461 yield file_name, file_size, unzipped_chunks
462 for _ in unzipped_chunks:
File c:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream_unzip.py:458, in stream_unzip..all()
456 break
457 else:
--> 458 raise UnexpectedSignatureError(signature)
UnexpectedSignatureError: b'<htm'`
I am getting this error