{"action":"created","issue":{"url":"https://api.github.com/repos/VUnit/vunit/issues/204","repository_url":"https://api.github.com/repos/VUnit/vunit","labels_url":"https://api.github.com/repos/VUnit/vunit/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/VUnit/vunit/issues/204/comments","events_url":"https://api.github.com/repos/VUnit/vunit/issues/204/events","html_url":"https://github.com/VUnit/vunit/issues/204","id":186998390,"number":204,"title":"IOError due to long path to .vunit_hash file","user":{"login":"bleviet","id":5185022,"avatar_url":"https://avatars.githubusercontent.com/u/5185022?v=3","gravatar_id":"","url":"https://api.github.com/users/bleviet","html_url":"https://github.com/bleviet","followers_url":"https://api.github.com/users/bleviet/followers","following_url":"https://api.github.com/users/bleviet/following{/other_user}","gists_url":"https://api.github.com/users/bleviet/gists{/gist_id}","starred_url":"https://api.github.com/users/bleviet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleviet/subscriptions","organizations_url":"https://api.github.com/users/bleviet/orgs","repos_url":"https://api.github.com/users/bleviet/repos","events_url":"https://api.github.com/users/bleviet/events{/privacy}","received_events_url":"https://api.github.com/users/bleviet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-03T08:15:39Z","updated_at":"2016-11-08T13:22:48Z","closed_at":null,"body":"Hi,\r\nwhile executing VUnit on Windows and Python 2.7.12, the following error occurs with very long path names (for example in my case 296 characters)\r\n\r\n> File \"C:\\Python27\\lib\\site-packages\\vunit_hdl-0.71.0-py2.7.egg\\vunit\\project.p\r\ny\", line 399, in update\r\n    ostools.write_file(self._hash_file_name_of(source_file), new_content_hash)\r\n  File \"C:\\Python27\\lib\\site-packages\\vunit_hdl-0.71.0-py2.7.egg\\vunit\\ostools.p\r\ny\", line 269, in write_file\r\n    with open(file_name, \"w\") as file_to_write:\r\nIOError: [Errno 2] No such file or directory: '<long_path_with_296_characters>.vunit_hash'\r\n\r\nI've found a solution for that by changing the line 399 in project.py:\r\n\r\n> ostools.write_file(self._hash_file_name_of(source_file), new_content_hash)\r\n\r\nto\r\n\r\n> ostools.write_file(\"\\\\\\\\\\\\\\\\?\\\\\\\\\" + self._hash_file_name_of(source_file), new_content_hash)\r\n\r\n(Link to this solution: http://stackoverflow.com/questions/14075465/copy-a-file-with-a-too-long-path-to-another-directory-in-python)\r\n\r\nPlease verify and provide an appropriate solution for that. Thank you!\r\n\r\nBest regards,\r\nBach"},"comment":{"url":"https://api.github.com/repos/VUnit/vunit/issues/comments/259134729","html_url":"https://github.com/VUnit/vunit/issues/204#issuecomment-259134729","issue_url":"https://api.github.com/repos/VUnit/vunit/issues/204","id":259134729,"user":{"login":"bleviet","id":5185022,"avatar_url":"https://avatars.githubusercontent.com/u/5185022?v=3","gravatar_id":"","url":"https://api.github.com/users/bleviet","html_url":"https://github.com/bleviet","followers_url":"https://api.github.com/users/bleviet/followers","following_url":"https://api.github.com/users/bleviet/following{/other_user}","gists_url":"https://api.github.com/users/bleviet/gists{/gist_id}","starred_url":"https://api.github.com/users/bleviet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleviet/subscriptions","organizations_url":"https://api.github.com/users/bleviet/orgs","repos_url":"https://api.github.com/users/bleviet/repos","events_url":"https://api.github.com/users/bleviet/events{/privacy}","received_events_url":"https://api.github.com/users/bleviet/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T13:22:48Z","updated_at":"2016-11-08T13:22:48Z","body":"After fixing the errors I mentioned, which have no relationship with IOError, the simulation runs and provides expected results. So I can confirm in this case, the IOError is solved by adding the prefix \"\\\\\\\\\\\\\\\\?\\\\\\\\\"."}}
{"actor":{"display_login":"bleviet"}}