To fix error:
w.Placement = placementFromDXFOCS(polyline)
File "E:\Data\My Downloads\FreeCAD_0.19.16587_x64_Conda_Py3QT5-WinVS2015\FreeCAD_0.19.16587_x64_Conda_Py3QT5-WinVS2015\Mod\Draft\importDXF.py", line 422, in placementFromDXFOCS
draftWPlane = FreeCAD.DraftWorkingPlane
<class 'AttributeError'>: module 'FreeCAD' has no attribute 'DraftWorkingPlane'