d0c-s4vage / lookatme

An interactive, terminal-based markdown presenter
https://lookatme.readthedocs.io/en/latest/
MIT License
2.08k stars 61 forks source link

NameError: name 'fcntl' is not defined & AttributeError: 'NoneType' object has no attribute 'curr_slide' #128

Open laischaves opened 2 years ago

laischaves commented 2 years ago

Error message

Traceback (most recent call last):
  File "C:\Python310\lib\site-packages\lookatme\_main_.py", line 139, in main
    pres.run()
  File "C:\Python310\lib\site-packages\lookatme\pres.py", line 141, in run
    self.tui = lookatme.tui.create_tui(self, start_slide=start_slide)
  File "C:\Python310\lib\site-packages\lookatme\tui.py", line 364, in create_tui
    tui = MarkdownTui(pres, start_slide)
  File "C:\Python310\lib\site-packages\lookatme\tui.py", line 205, in _init_
    screen = urwid.raw_display.Screen()
  File "C:\Python310\lib\site-packages\urwid\raw_display.py", line 92, in _init_
    fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
NameError: name 'fcntl' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python310\Scripts\lookatme-script.py", line 33, in <module>
    sys.exit(load_entry_point('lookatme==2.3.2', 'console_scripts', 'lookatme')())
  File "C:\Python310\lib\site-packages\click\core.py", line 829, in _call_
    return self.main(*args, **kwargs)
  File "C:\Python310\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Python310\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python310\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Python310\lib\site-packages\lookatme\_main_.py", line 141, in main
    number = pres.tui.curr_slide.number + 1
AttributeError: 'NoneType' object has no attribute 'curr_slide'

To Reproduce

> lookatme .\pres.md

Screenshots image

Environment:

gorrioncillo commented 2 years ago

I have the same problem. Same OS and version. Any news on this?

notjl commented 2 years ago

Same problem. Same OS. I tried using several python versions 3.7-3.10, to no avail.

notjl commented 2 years ago

I browse through the packages mentioned in the error. It seems lookatme is GNU/Linux strictly since urwid uses a module called fcntl.

d0c-s4vage commented 1 year ago

Hmm, you're right about the fcntl problem... let's keep this issue open and see what can be done.