Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle 2 stitcher instances in same Windows directory #824

Open
ahelsing opened this issue May 20, 2015 · 3 comments
Open

Handle 2 stitcher instances in same Windows directory #824

ahelsing opened this issue May 20, 2015 · 3 comments
Assignees
Milestone

Comments

@ahelsing
Copy link
Member

If 2 stitcher instances run in the same directory on Windows, the 2nd process gets this error:

 C:\Users\lnevers\Downloads>stitcher deletesliver lnwin7
 Traceback (most recent call last):
   File "stitcher.py", line 466, in <module>
   File "stitcher.py", line 447, in main
   File "stitcher.py", line 307, in call
 WindowsError: [Error 32] The process cannot access the file because it is being used by another process

Apparently on Windows, the os.rename of the existing stitcher.log to a new copy fails, where on Linux the first copy becomes stitcher.log.1 but the process continues to write to it successfully.

@ahelsing
Copy link
Member Author

Options I see:

  1. This new copy of stitcher writes to something named other than stitcher.log
  2. Exit with a suggestion of running in a different directory or using --fileDir

@ahelsing
Copy link
Member Author

Tom suggests that stitcher should behave as many other programs do: if you download a file in your browser and the suggested filename is taken, it adds a number to the end and renames the new file.

Additionally, this renaming would handle the rename problem (this issue). And it would address Niky's issue #789 to have the stitcher log files named from when the run was.

Logs could be named something like stitcher-YYYYMMDDHH24MI.log.

Documentation would have to be updated to help experimenters find the appropriate log file.

@ahelsing
Copy link
Member Author

Doing the simple thing for now; a nicer error message. Full solution pushed off to a later release.

@ahelsing ahelsing added this to the 2.10 milestone May 20, 2015
ahelsing added a commit that referenced this issue May 20, 2015
…d it is the text windows gives when the file is in use, then exit with a more helpful error message.
@ahelsing ahelsing modified the milestones: 2.10, 3.0 Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant