mindsdb / dfsql

SQL interface to Pandas
GNU General Public License v3.0
51 stars 9 forks source link

Spontaneous error during query #45

Closed StpMax closed 2 years ago

StpMax commented 2 years ago

Time-to-time, on random query i get error like this:

data = dfsql.sql_query(
      str(new_statement),
      ds_kwargs={'case_sensitive': False},
      reduce_output=False,
      **{'dataframe': df}
  )

error:

Traceback (most recent call last):
  File "/home/maxs/dev/mdb/venv38/sources/mindsdb/mindsdb/api/mysql/mysql_proxy/mysql_proxy.py", line 1194, in query_answer
    data = dfsql.sql_query(
  File "/home/maxs/dev/mdb/venv38/sources/dfsql/dfsql/__init__.py", line 36, in sql_query
    shutil.rmtree(tmpdir)
  File "/usr/local/lib/python3.8/shutil.py", line 722, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/local/lib/python3.8/shutil.py", line 720, in rmtree
    os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/tmp/dfsql_temp_1639132502'

[Errno 39] Directory not empty: '/tmp/dfsql_temp_1639132502'
StpMax commented 2 years ago

fixed