d0c-s4vage / lookatme

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

TypeError: int() argument must be a string, a bytes-like object or a number, not 'Integer' #120

Open peymanmajidi opened 3 years ago

peymanmajidi commented 3 years ago

I've install lookatme successfuly but when I run it got this error:

Traceback (most recent call last): File "C:\ProgramData\Anaconda3\Scripts\lookatme-script.py", line 33, in sys.exit(load_entry_point('lookatme===-VERSION-', 'console_scripts', 'lookatme')()) File "C:\ProgramData\Anaconda3\Scripts\lookatme-script.py", line 25, in importlib_load_entry_point return next(matches).load() File "C:\ProgramData\Anaconda3\lib\importlib\metadata.py", line 77, in load module = import_module(match.group('module')) File "C:\ProgramData\Anaconda3\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 618, in _load_backward_compatible File "", line 259, in load_module File "C:\ProgramData\Anaconda3\lib\site-packages\lookatme-version-py3.8.egg\lookatme\main.py", line 17, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 618, in _load_backward_compatible File "", line 259, in load_module File "C:\ProgramData\Anaconda3\lib\site-packages\lookatme-version-py3.8.egg\lookatme\tui.py", line 16, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 618, in _load_backward_compatible File "", line 259, in load_module File "C:\ProgramData\Anaconda3\lib\site-packages\lookatme-version-py3.8.egg\lookatme\contrib\init__.py", line 15, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 618, in _load_backward_compatible File "", line 259, in load_module File "C:\ProgramData\Anaconda3\lib\site-packages\lookatme-version-py3.8.egg\lookatme\contrib\file_loader.py", line 42, in File "C:\ProgramData\Anaconda3\lib\site-packages\lookatme-version-py3.8.egg\lookatme\contrib\file_loader.py", line 49, in FileSchema File "C:\ProgramData\Anaconda3\lib\site-packages\marshmallow-3.12.1-py3.8.egg\marshmallow\schema.py", line 547, in dump result = self._serialize(processed_obj, many=many) File "C:\ProgramData\Anaconda3\lib\site-packages\marshmallow-3.12.1-py3.8.egg\marshmallow\schema.py", line 515, in _serialize value = field_obj.serialize(attr_name, obj, accessor=self.get_attribute) File "C:\ProgramData\Anaconda3\lib\site-packages\marshmallow-3.12.1-py3.8.egg\marshmallow\fields.py", line 318, in serialize return self._serialize(value, attr, obj, **kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\marshmallow-3.12.1-py3.8.egg\marshmallow\fields.py", line 898, in _serialize ret = self._format_num(value) # type: _T File "C:\ProgramData\Anaconda3\lib\site-packages\marshmallow-3.12.1-py3.8.egg\marshmallow\fields.py", line 873, in _format_num return self.num_type(value) TypeError: int() argument must be a string, a bytes-like object or a number, not 'Integer'

:(

peymanmajidi commented 3 years ago

I've tried in Windows 10 64bit: python setup.py install WSL2 Ubuntu: sudo python3.8 setup.py install and got the same error

d0c-s4vage commented 3 years ago

Can I get you to do a pip freeze for me so I know which versions are being used? This sounds like an older marsmallow bug that I fixed

peymanmajidi commented 3 years ago

This is pip freeze result:

    marshmallow==3.12.1

asciicast

Thanks for your support

d0c-s4vage commented 3 years ago

Hmm, maybe it specifically has to do with lookatme\contrib\file_loader.py? You're not even trying to render a markdown file at all, you're just running lookatme with no input?

I still can't seem to duplicate this. I think I'll have to setup a windows VM to figure it out.

https://github.com/d0c-s4vage/lookatme/issues/114 had the same error message... Can you double check that you're using the latest version of lookatme?

peymanmajidi commented 3 years ago

I get the same error when I pass a filename to lookatme. In both wsl2 and Windows PowerShell Thank you bro

peymanmajidi commented 3 years ago

114

TypeError: int() argument must be a string, a bytes-like object or a number, not 'Integer'

Yeap, we get same error.

AB9IL commented 3 years ago

I was encountering the same error, but it went away after updating my Python packages today. I am not sure if it required an upgraded Marshmallow or Lookatme package (or both), but now it works nicely.