Can not upload files

What is the problem?

Went to upload a file and Octoprint hung at the Saving portion of the upload. Restarted the server and now have lost all files in Octoprint and can not upload files or create directories

What did you already try to solve it?

Rebooted a number of time

Have you tried running in safe mode and if so did it solve the issue?

Ran in safe mode, while it was loading I could see my file list was back, and some test directories that I created when it was not working were visible. But then it asked me to refresh my browser and after doing this the file list was again blank

Complete Logs

`octoprint.log`, `serial.log` or output on terminal tab *at a minimum*, browser error console if UI issue ... **no logs, no support!** Not log excerpts, *complete* logs.)

2020-10-09 15:51:26,525 - octoprint - ERROR - Exception on /api/files [GET]
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/vendor/", line 199, in _decorated
    rv = f(*args, **kw)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/", line 1116, in decorated_function
    response = f(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/", line 130, in readGcodeFiles
    return jsonify(files=files,,
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/", line 266, in fixed_jsonify
    dumps(data, indent=indent, separators=separators, allow_nan=False) + '\n',
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/json/", line 211, in dumps
    rv = _json.dumps(obj, **kwargs)
  File "/usr/lib/python2.7/json/", line 251, in dumps
    sort_keys=sort_keys, **kw).encode(obj)
  File "/usr/lib/python2.7/json/", line 209, in encode
    chunks = list(chunks)
  File "/usr/lib/python2.7/json/", line 434, in _iterencode
    for chunk in _iterencode_dict(o, _current_indent_level):
  File "/usr/lib/python2.7/json/", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/", line 332, in _iterencode_list
    for chunk in chunks:
  File "/usr/lib/python2.7/json/", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/", line 400, in _iterencode_dict
    yield _floatstr(value)
  File "/usr/lib/python2.7/json/", line 254, in floatstr
ValueError: Out of range float values are not JSON compliant: inf
2020-10-09 15:51:26,543 - tornado.access - ERROR - 500 GET /api/files?recursive=true (::ffff: 967.23ms

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Its been working great for years. Something must have got corrupted when I uploaded a recent file. It seems to be a corrupt inf file from looking at the log, but it does not say the name and location of the file. So not sure had to manual edit and fix.

I can't help you with the error itself but I think your sd card might be broken.
Maybe you're lucky and your filesystem is just corrupted and you can fix it by flashing a new image but I would suggest you buy a new sd card.