2

I am trying to use cx_freeze to freeze an app that uses Feedparser. The app works perfectly if I launch it from the command line using python. However, when I try to freeze it using cx_freeze, I don't get an error until I try to launch the app. Then I get:

Traceback (most recent call last):
  File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/__startup__.py", line 66, in run
    module.run()
  File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run
    exec(code, m.__dict__)
  File "main.py", line 8, in <module>
  File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/__init__.py", line 28, in <module>
    from .api import parse
  File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/api.py", line 36, in <module>
    from .html import _BaseHTMLProcessor
  File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/html.py", line 31, in <module>
    from .sgml import *
  File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/sgml.py", line 30, in <module>
    import sgmllib
ModuleNotFoundError: No module named 'sgmllib'

I know sgmllib is no longer used in Python 3, but since I don't get this error when I launch it from the command line it doesn't seem to be a feedparser issue. Any thoughts?

Ricky Kresslein
  • 372
  • 1
  • 13

1 Answers1

2

The cx_Freeze developer helped me with this same issue on Github. Here's the thread.

pepo_boyii
  • 60
  • 1
  • 7
  • Thank you! Sorry, I don't have enough rep to mark the answer as useful but this helped. I updated to the latest cx_freeze and installed wheel and everything built okay. However, now when I launch the app I get 'Segmentation fault (core dumped)'. Any ideas? – Ricky Kresslein Jan 30 '21 at 19:27
  • I haven't gotten this error. You'll have to check if it's a compiling error, or a cx_Freeze error. But I think this is where my usefulness ends :( – pepo_boyii Feb 25 '21 at 05:07