View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003862 | Draft | Bug | public | 2019-02-25 18:42 | 2020-10-17 10:31 |
Reporter | Alexandr Parkhomenko | Assigned To | |||
Priority | low | Severity | crash | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Summary | 0003862: Export from freecad errors | ||||
Description | EXPORT FROM FREECAD ERRORS:
| ||||
Additional Information | freecad git version 4 feb 2019 system Archlinux x64 | ||||
Tags | #pending, #post-to-forum, export, import | ||||
FreeCAD Information | |||||
|
OP please follow the guidelines (large yellow banner at the top of the page) |
|
@wmayer care to weigh in ? |
|
OS: Arch Linux Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.10 Build type: Release Python version: 3.7.2 Qt version: 5.12.1 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/United States (en_US) |
|
https://docs.python.org/3/library/functions.html#open 'b' appended to the mode opens the file in binary mode. in file https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Draft/importOCA.py#L264 we work with strings |
|
@yorik please weigh in |
|
Yes, in python2, opening files in 'wb' mode worked for both text and binary files. In python3, this doesn't work anymore. 'w' is for text files, and 'wb' for binary files. But 'w' works for both py2 and 3 when we work with text. The change that comments out <title> however doesn't seem good to me. What doesn't work in py3 is the .encode('utf8'). But that part is still needed for py2. So the proper way is to add something like this:
Beware that the code has changed already since your patch. |
|
What's the status of this ticket? |
|
No response from OP. Closing ticket |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-02-25 18:42 | Alexandr Parkhomenko | New Issue | |
2019-02-25 18:42 | Alexandr Parkhomenko | Tag Attached: export | |
2019-02-25 18:42 | Alexandr Parkhomenko | Tag Attached: import | |
2019-02-26 10:36 | Kunda1 | Note Added: 0012771 | |
2019-02-26 10:36 | Kunda1 | Status | new => feedback |
2019-02-26 10:37 | Kunda1 | Description Updated | |
2019-03-03 14:07 | Kunda1 | Note Added: 0012827 | |
2019-03-03 20:25 | Alexandr Parkhomenko | Note Added: 0012838 | |
2019-03-03 20:25 | Alexandr Parkhomenko | Status | feedback => new |
2019-03-03 20:36 | Alexandr Parkhomenko | Note Added: 0012839 | |
2019-03-03 20:43 | Alexandr Parkhomenko | Note Edited: 0012838 | |
2019-09-05 21:50 | Kunda1 | Note Added: 0013548 | |
2019-09-05 21:50 | Kunda1 | Tag Attached: #post-to-forum | |
2019-09-05 21:51 | Kunda1 | Tag Attached: #pending | |
2019-09-06 02:03 | yorik | Note Added: 0013550 | |
2019-09-06 02:04 | yorik | Note Edited: 0013550 | |
2020-10-11 01:08 | Kunda1 | Status | new => feedback |
2020-10-11 01:08 | Kunda1 | Note Added: 0014832 | |
2020-10-17 10:31 | Kunda1 | Status | feedback => closed |
2020-10-17 10:31 | Kunda1 | Resolution | open => no change required |
2020-10-17 10:31 | Kunda1 | Note Added: 0014901 |