The process cannot access the file because it is being used by another process (windows)
{'login': 'saareliad', 'id': 22762845, 'node_id': 'MDQ6VXNlcjIyNzYyODQ1', 'avatar_url': 'https://avatars.githubusercontent.com/u/22762845?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/saareliad', 'html_url': 'https://github.com/saareliad', 'followers_url': 'https://api.github.com/users/saareliad/followers', 'following_url': 'https://api.github.com/users/saareliad/following{/other_user}', 'gists_url': 'https://api.github.com/users/saareliad/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/saareliad/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/saareliad/subscriptions', 'organizations_url': 'https://api.github.com/users/saareliad/orgs', 'repos_url': 'https://api.github.com/users/saareliad/repos', 'events_url': 'https://api.github.com/users/saareliad/events{/privacy}', 'received_events_url': 'https://api.github.com/users/saareliad/received_events', 'type': 'User', 'site_admin': False}
[]
[]
["Hi, which version of `nlp` are you using?\r\n\r\nBy the way we'll be releasing today a significant update fixing many issues (but also comprising a few breaking changes).\r\nYou can see more informations here #545 and try it by installing from source from the master branch."
 "I'm using version 0.4.0.\r\n\r\n"
 "Ok, it's probably fixed on master. Otherwise if you can give me a fully self-contained exemple to reproduce the error, I can try to investigate."
 "I get the same behavior, on Windows, when `map`ping a function to a loaded dataset. \r\nThe error doesn't occur if I re-run the cell a second time though! \r\nI'm on version 1.0.1."
 'This is going to be fixed by #644 '
 "@saareliad I got the same issue that troubled me quite a while. Unfortunately, there are no good answers to this issue online, I tried it on Linux and that's absolutely fine. After hacking the source code, I solved this problem as follows.\r\n\r\nIn the source code file: arrow_dataset.py -> _map_single(...)\r\n\r\nchange\r\n```python\r\nif update_data and tmp_file is not None:\r\n    shutil.move(tmp_file.name, cache_file_name)\r\n```\r\nto\r\n```python\r\ntmp_file.close()\r\nif update_data and tmp_file is not None:\r\n    shutil.move(tmp_file.name, cache_file_name)\r\n```\r\n\r\nThen it works without needing multiple times runs to avoid the permission error.\r\nI know this solution is unusual since it changes the source code. Hopefully, the lib's contributors can have better solutions in the future.\r\n"
 '@wangcongcong123 thanks  for sharing.\n(BTW I also solved it locally on windows by putting the problematic line under try except and not using cache... On windows I just needed 1% of the dataset anyway)']
Hi, I consistently get the following error when developing in my PC (windows 10):

```
    train_dataset = train_dataset.map(convert_to_features, batched=True)
  File "C:\Users\saareliad\AppData\Local\Continuum\miniconda3\envs\py38\lib\site-packages\nlp\arrow_dataset.py", line 970, in map
    shutil.move(tmp_file.name, cache_file_name)
  File "C:\Users\saareliad\AppData\Local\Continuum\miniconda3\envs\py38\lib\shutil.py", line 803, in move
    os.unlink(src)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\saareliad\\.cache\\huggingface\\datasets\\squad\\plain_text\\1.0.0\\408a8fa46a1e2805445b793f1022e743428ca739a34809fce872f0c7f17b44ab\\tmpsau1bep1'

```
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/590/reactions', 'total_count': 1, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 1}