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

Writing out files raises FileNotFoundError #445

Closed
AndrejAleksic opened this Issue Sep 8, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@AndrejAleksic

AndrejAleksic commented Sep 8, 2015

Standard Save works "td_bank.moneyguru", but when "save as" or export of any type is atempted, FileNotFoundError is returned.
Naturally the target path does not exist because I want to write a new file.

Application Name: moneyGuru
Version: 2.9.3

Traceback (most recent call last):
  File "/home/kinleyage/sandbox/moneyguru/qt/controller/document.py", line 109, in saveAs
    self.model.save_to_xml(docpath)
  File "/home/kinleyage/sandbox/moneyguru/core/document.py", line 1210, in save_to_xml
    self.transactions, self.schedules, self.budgets
  File "/home/kinleyage/sandbox/moneyguru/core/saver/native.py", line 119, in save
    fp = open(filename, 'wt', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: "('/home/kinleyage/sandbox/moneyguru_doc/td_bank.moneyguru.15aug.backup.moneyguru', 'moneyGuru Documents (*.moneyguru)').moneyguru"

Just as additional info, the original file does exists, and I am cpable of writing to it.

┌┌(kinleyage@kinleytpad)┌(543/pts/6)┌(10:08pm:09/07/15)┌-
└┌(%:~)┌- ls -ali /home/kinleyage/sandbox/moneyguru_doc/
2244825 drwxr-xr-x 3 kinleyage kinleyage   4096 Sep  7 21:47 .
2241171 -rw-r--r-- 1 kinleyage kinleyage 158560 Sep  7 22:01 /home/kinleyage/sandbox/moneyguru_doc/td_bank.moneyguru

Nontheless, I can still manually copy the original file in order to make backups.

@hsoft hsoft added the bug label Sep 8, 2015

@hsoft hsoft added this to the v2.9 milestone Sep 8, 2015

@ancientHacker

This comment has been minimized.

Contributor

ancientHacker commented Oct 27, 2015

I can't reproduce this on Mac. I suspect it should have the qt label.

@hsoft

This comment has been minimized.

Owner

hsoft commented Oct 27, 2015

True, this is probably qt-specific

@hsoft hsoft added the qt label Oct 27, 2015

@ancientHacker

This comment has been minimized.

Contributor

ancientHacker commented Nov 13, 2015

I can't repro this in Mac/QT either. Perhaps this has to do with the fact that he has automatic backups set up. I'll try repro-ing it that way. -d.

@hsoft

This comment has been minimized.

Owner

hsoft commented Nov 13, 2015

I'd be surprised if it had anything to do with autosaves

@hsoft

This comment has been minimized.

Owner

hsoft commented Nov 13, 2015

This crash is reproducible by manually entering a path for a destination filename for which the enclosing folder doesn't exist. For example, if I enter ~/doesnotexist/foo.moneyguru, I'll get the crash.

I don't see any other way to reproduce the crash than by manually typing a directory name as part of the destination name.

@AndrejAleksic is that what happened for you?

hsoft added a commit that referenced this issue Dec 24, 2015

Don't crash when saving to a folder that doesn't exist
Instead, create that folder and save afterwards.

fixes #445

@hsoft hsoft closed this in 05b3142 Dec 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment