After following to the letter the instructions in https://forums.fedoraforum.org/showthread.php?t=315055, which was posted on 4 Aug 17, using fedora-live-workstation.ks as the starting point for ksflatten, I ran live-media creator. The build failed. I end with the following results (same results as I get when I use my own ks, which I have used successfully (with minor modifications) with livecd-creator from F11 to F23 and continue to use successfully with CentOS).

Does anyone have a suggestion on how to fix?

# livemedia-creator --make-iso --no-virt --iso-only --iso-name 171008-fedora-livecd-fc26.iso --releasever 26 --project Fedora-Custom --ks /home/user/kickstart/flat-fedora-live-workstation.ks
2017-10-08 14:54:31,407: disk_img = /var/tmp/lmc-disk-lp4_gwiy.img
2017-10-08 14:54:31,408: Using disk size of 5122MiB
2017-10-08 14:54:33,644: Running anaconda.
2017-10-08 14:54:34,986: Starting installer, one moment...
2017-10-08 14:54:34,986: terminal size detection failed, using default width
2017-10-08 14:54:34,986: anaconda 26.21.12-1 for Fedora-Custom 26 (pre-release) started.
2017-10-08 14:54:35,018: Traceback (most recent call last):
2017-10-08 14:54:35,018: File "/usr/sbin/anaconda", line 486, in <module>
2017-10-08 14:54:35,018: ksdata = startup_utils.parse_kickstart(opts, addon_paths)
2017-10-08 14:54:35,019: File "/usr/lib64/python3.6/site-packages/pyanaconda/startup_utils.py", line 447, in parse_kickstart
2017-10-08 14:54:35,019: ksdata = kickstart.parseKickstart(ks, options.ksstrict)
2017-10-08 14:54:35,019: File "/usr/lib64/python3.6/site-packages/pyanaconda/kickstart.py", line 2294, in parseKickstart
2017-10-08 14:54:35,019: handler = AnacondaKSHandler(addon_paths["ks"])
2017-10-08 14:54:35,019: File "/usr/lib64/python3.6/site-packages/pyanaconda/kickstart.py", line 2222, in __init__
2017-10-08 14:54:35,019: classes = collect(module_name, path, lambda cls: issubclass(cls, self.AddonClassType))
2017-10-08 14:54:35,019: File "/usr/lib64/python3.6/site-packages/pyanaconda/iutil.py", line 1459, in collect
2017-10-08 14:54:35,019: __import__(module_pattern % mod_name)
2017-10-08 14:54:35,019: File "/usr/share/anaconda/addons/org_fedora_realm/ks/realm.py", line 162
2017-10-08 14:54:35,019: except getopt.GetoptError, ex:
2017-10-08 14:54:35,019: ^
2017-10-08 14:54:35,019: SyntaxError: invalid syntax
2017-10-08 14:54:35,092: Running anaconda failed: process '['anaconda', '--kickstart', '/home/user/kickstart/flat-fedora-live-workstation.ks', '--cmdline', '--dirinstall', '--remotelog', '127.0.0.1:44281']' exited with status 1
2017-10-08 14:55:33,744: Install failed: novirt_install failed
2017-10-08 14:55:33,745: Removing bad disk image
2017-10-08 14:55:33,759: ERROR: Image creation failed: novirt_install failed