View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003569 | FreeCAD | Bug | public | 2018-08-23 20:52 | 2020-09-02 11:19 |
Reporter | TheMarkster | Assigned To | wmayer | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | reopened | ||
Product Version | 0.18 | ||||
Fixed in Version | 0.18 | ||||
Summary | 0003569: App::PropertyStringList not python3 ready | ||||
Description | Feature python objects containing a property of type App::PropertyStringList do not work in Python3. When attempting to modify this property you get this error in the report view: Traceback (most recent call last): File "<string>", line 1, in <module> <class 'NameError'>: name 'unicode' is not defined Stack Trace: Traceback (most recent call last): File "<string>", line 1, in <module> See this post on the forum: https://forum.freecadweb.org/viewtopic.php?f=3&t=7598&p=252150#p251960 and https://forum.freecadweb.org/viewtopic.php?f=22&t=30462 | ||||
Steps To Reproduce | You need to be running a python3 build. Run this macro (see attached TestClass.py file) to create a simple feature python object named TestObject:
Select the "propertyStringList" property in the data tab of the property view after selecting the TestObject object in the tree view. Click the 3 dots ... and enter some lines of text and press OK. You will get the error message and the property will not get updated. | ||||
Additional Information | OS: Windows 10 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.14426 (Git) Build type: Release Branch: master Hash: 3927a2ed8b009ab4dfdca53fbebf0060193b67b4 Python version: 3.6.6 Qt version: 5.6.2 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/UnitedStates (en_US) | ||||
Tags | python feature | ||||
FreeCAD Information | |||||
|
TestClass.py (674 bytes)
import FreeCAD from PySide import QtGui,QtCore class TestClass: def __init__(self, obj): obj.Proxy = self def onChanged(self, fp, prop): '''Do something when a property has changed''' FreeCAD.Console.PrintMessage("Change property: " + str(prop) + "\n") def execute(self, fp): '''Do something when doing a recomputation, this method is mandatory''' pass #FreeCAD.Console.PrintMessage("Recompute Python SSHelper feature\n") test=FreeCAD.ActiveDocument.addObject("App::FeaturePython","TestObject") TestClass(test) test.addProperty("App::PropertyStringList","propertyStringList") |
|
Fixed already: Your text to link here... |
|
Fixed by wmayer in http://github.com/FreeCAD/FreeCAD/commit/24579fff3 |
|
New steps to reproduce: 1. paste to console:
2. select new object, modify propertyStringList property. type 4 lines:
3. Clear selection, select the object again. The property value now reads |
|
https://github.com/FreeCAD/FreeCAD/pull/1642 |
|
https://github.com/FreeCAD/FreeCAD/commit/9e5b31fe2a49c57436fb47df7b56150db6362dcd |
|
c:FreeCAD:24579fff3: c:FreeCAD:9e5b31fe2: |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-08-23 20:52 | TheMarkster | New Issue | |
2018-08-23 20:52 | TheMarkster | Tag Attached: python feature | |
2018-08-23 20:52 | TheMarkster | File Added: TestClass.py | |
2018-08-23 21:21 | TheMarkster | Note Added: 0011648 | |
2018-08-25 23:45 | Kunda1 | Assigned To | => wmayer |
2018-08-25 23:45 | Kunda1 | Status | new => closed |
2018-08-25 23:45 | Kunda1 | Resolution | open => fixed |
2018-08-25 23:45 | Kunda1 | Fixed in Version | => 0.18 |
2018-08-25 23:45 | Kunda1 | Note Added: 0011656 | |
2018-09-03 17:38 | DeepSOIC | Status | closed => feedback |
2018-09-03 17:38 | DeepSOIC | Resolution | fixed => reopened |
2018-09-03 17:38 | DeepSOIC | Note Added: 0011695 | |
2018-09-03 17:42 | DeepSOIC | Description Updated | |
2018-09-03 18:13 | TheMarkster | Note Added: 0011696 | |
2018-09-03 18:13 | TheMarkster | Status | feedback => assigned |
2018-09-10 13:54 | wmayer | Status | assigned => closed |
2018-09-10 13:54 | wmayer | Note Added: 0011705 | |
2020-09-02 11:19 | Kunda1 | Note Added: 0014724 |