View Issue Details

IDProjectCategoryView StatusLast Update
0000625FreeCADBugpublic2012-03-13 12:14
Reportershoogen Assigned Toyorik  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.12 
Target VersionFixed in Version0.13 
Summary0000625: reloading python modules from Draft module breaks file handling
Descriptionwhile reloading the module the reference to the orginal python 'open' function gets lost. When opening/importing files (with handeled in this module) FreeCAD enters an endless loop.
possible fix: check in which module open is defined.
if open.__module__ == '__builtin__':
    pythonopen = open
TagsNo tags attached.
FreeCAD Information

Activities

yorik

2012-03-07 11:06

administrator   ~0001718

We could maybe also simply use __builtins__.open everywhere instead of pythonopen... I'll have a look

yorik

2012-03-12 20:47

administrator   ~0001755

Done in commit f38e6da
I ended up using your method, for some reason __builtins__ is not available while FreeCAD loads...

shoogen

2012-03-13 10:32

developer   ~0001759

this also applies to Arch/importOBJ.py

yorik

2012-03-13 12:14

administrator   ~0001760

Oh good catch, thanks... Fixed there too now.

Issue History

Date Modified Username Field Change
2012-03-06 10:04 shoogen New Issue
2012-03-07 11:04 yorik Status new => assigned
2012-03-07 11:04 yorik Assigned To => yorik
2012-03-07 11:06 yorik Note Added: 0001718
2012-03-12 20:47 yorik Note Added: 0001755
2012-03-12 20:47 yorik Status assigned => closed
2012-03-12 20:47 yorik Resolution open => fixed
2012-03-12 20:47 yorik Fixed in Version => 0.13
2012-03-13 10:32 shoogen Note Added: 0001759
2012-03-13 10:32 shoogen Status closed => feedback
2012-03-13 10:32 shoogen Resolution fixed => reopened
2012-03-13 12:14 yorik Note Added: 0001760
2012-03-13 12:14 yorik Status feedback => closed
2012-03-13 12:14 yorik Resolution reopened => fixed