lookatme icon indicating copy to clipboard operation
lookatme copied to clipboard

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

Open peymanmajidi opened this issue 3 years ago • 7 comments

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 avatar Jun 12 '21 11:06 peymanmajidi

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

peymanmajidi avatar Jun 12 '21 12:06 peymanmajidi

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

d0c-s4vage avatar Jun 13 '21 13:06 d0c-s4vage

This is pip freeze result:

	marshmallow==3.12.1

asciicast

Thanks for your support

peymanmajidi avatar Jun 14 '21 04:06 peymanmajidi

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?

d0c-s4vage avatar Jun 17 '21 05:06 d0c-s4vage

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

peymanmajidi avatar Jun 18 '21 12:06 peymanmajidi

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

Yeap, we get same error.

peymanmajidi avatar Jun 18 '21 12:06 peymanmajidi

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.

AB9IL avatar Jul 28 '21 16:07 AB9IL