View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002513 | FreeCAD | Bug | public | 2016-04-17 12:05 | 2016-05-11 08:22 |
Reporter | DrInequality | Assigned To | wmayer | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | amd64 | OS | Linux | OS Version | Ubuntu |
Product Version | 0.15 | ||||
Fixed in Version | 0.17 | ||||
Summary | 0002513: No write permission for new file (python) | ||||
Description | Fails to create a new file in the current working directory. Works for any relative or absolute path. Output is: FreeCAD 0.16, Libs: 0.16R6700 (Git) ... Reading STEP file...... Traceback (most recent call last): File "xform.py", line 14, in <module> Mesh.export(o, 'out.stl') RuntimeError: No write permission for file: out.stl | ||||
Steps To Reproduce | This python script: import sys sys.path.append('/usr/lib/freecad/lib/') import FreeCAD import Import import Part import Mesh Part.open('in.stp') o = [ FreeCAD.getDocument("Unnamed").findObjects()[0] ] Mesh.export(o, 'out.stl') run with an appropriate in.stp in the current working directory | ||||
Additional Information | Looks like it tries to access() the file, which fails and then it makes no attempt whatsoever to open() the file for writing | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
I can confirm that this issue exists. I will work on fixing it. |
|
I have a fix and have submitted a pull request: https://github.com/ezzieyguywuf/FreeCAD-1 |
FreeCAD: master 4ebb62be 2016-05-09 01:07:23 Wolfgang E. Sanyer Committer: wmayer Details Diff |
Fixed bug ID0002513, where Mesh.export failed. The failure occered when Mesh.export was passed just a filename, such as 'out.stl'. If '/some/path/out.stl' was passed it succeeded. |
Affected Issues 0002513 |
|
mod - src/Base/FileInfo.cpp | Diff File | ||
mod - src/Mod/Mesh/App/Core/MeshIO.cpp | Diff File | ||
FreeCAD: master f3a5deec 2016-05-10 22:47:14 Details Diff |
+ on Windows use the unicode version to get cwd + on other platforms use getcwd in a platform independent way |
Affected Issues 0002513 |
|
mod - src/Base/FileInfo.cpp | Diff File | ||
FreeCAD: master d7d347b2 2016-05-11 09:24:29 Details Diff |
+ if getcwd fails then use '.' |
Affected Issues 0002513 |
|
mod - src/Base/FileInfo.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-04-17 12:05 | DrInequality | New Issue | |
2016-05-07 22:34 | ezzieyguywuf | Note Added: 0007069 | |
2016-05-08 23:18 | ezzieyguywuf | Note Added: 0007071 | |
2016-05-11 08:21 | wmayer | Changeset attached | => FreeCAD Master master 4ebb62be |
2016-05-11 08:21 | wmayer | Changeset attached | => FreeCAD Master master f3a5deec |
2016-05-11 08:21 | wmayer | Changeset attached | => FreeCAD Master master d7d347b2 |
2016-05-11 08:22 | wmayer | Status | new => closed |
2016-05-11 08:22 | wmayer | Assigned To | => wmayer |
2016-05-11 08:22 | wmayer | Resolution | open => fixed |
2016-05-11 08:22 | wmayer | Fixed in Version | => 0.17 |