0

Hello all when I run a python program that makes network requests and downloads a lot of data, I get this error:

Traceback (most recent call last):
  File "C:\Python311\Lib\site-packages\pandas\io\formats\csvs.py", line 261, in save
    self._save()
  File "C:\Python311\Lib\site-packages\pandas\io\formats\csvs.py", line 266, in _save
    self._save_body()
  File "C:\Python311\Lib\site-packages\pandas\io\formats\csvs.py", line 304, in _save_body
    self._save_chunk(start_i, end_i)
  File "C:\Python311\Lib\site-packages\pandas\io\formats\csvs.py", line 315, in _save_chunk
    libwriters.write_csv_rows(
  File "pandas\_libs\writers.pyx", line 72, in pandas._libs.writers.write_csv_rows
OSError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

OSError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\elena\Desktop\actors.py", line 57, in <module>
    get_popular_movies()
  File "C:\Users\elena\Desktop\actors.py", line 49, in get_popular_movies
    csv_edges.to_csv('edges.csv',index=False,header=True)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\pandas\util\_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\pandas\core\generic.py", line 3720, in to_csv
    return DataFrameRenderer(formatter).to_csv(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\pandas\util\_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\pandas\io\formats\format.py", line 1189, in to_csv
    csv_formatter.save()
  File "C:\Python311\Lib\site-packages\pandas\io\formats\csvs.py", line 241, in save
    with get_handle(
  File "C:\Python311\Lib\site-packages\pandas\io\common.py", line 133, in __exit__
    self.close()
  File "C:\Python311\Lib\site-packages\pandas\io\common.py", line 125, in close
    handle.close()
OSError: [Errno 28] No space left on device

From what I understand I don't have enough space on my computer. How can I fix this? I use windows not linux

Elly
  • 345
  • 1
  • 8
  • 1
    Does this answer your question? [Python\_OSError: \[Errno 28\] No space left on device](https://stackoverflow.com/questions/53457004/python-oserror-errno-28-no-space-left-on-device) – sahasrara62 Jan 10 '23 at 17:58
  • 1
    Get a larger hard drive. – tdelaney Jan 10 '23 at 17:59
  • 1
    Use a more compact storage format like parquet. You may even be able to use a gzip.GzipFile wrapper to your file to compress while saving . – tdelaney Jan 10 '23 at 18:01

0 Answers0