packt-cli / Packt-Publishing-Free-Learning

Scripts that automatically claim and download free daily eBooks from https://www.packtpub.com/packt/offers/free-learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sending e-mail breaks on Python 3.7

mjenczmyk opened this issue · comments

oracle@batcave:~$ packt-cli -c ~/.packt/config.cfg -g
[INFO] - JWT token has been fetched successfully!
[INFO] - Start grabbing ebook...
[INFO] - Getting your books data...
[INFO] - Books data has been successfully fetched.
[INFO] - You have already claimed Packt Free Learning "Mastering Blockchain - Second Edition" offer.
[SUCCESS] - Good, looks like all went well! :-)
oracle@batcave:~$ packt-cli -c ~/.packt/config.cfg -g -sm
[INFO] - JWT token has been fetched successfully!
[INFO] - Start grabbing ebook...
[INFO] - Getting your books data...
[INFO] - Books data has been successfully fetched.
[INFO] - You have already claimed Packt Free Learning "Mastering Blockchain - Second Edition" offer.
[ERROR] - Exception occurred option values must be strings
Traceback (most recent call last):
  File "/home/oracle/.virtualenvs/packt/lib/python3.7/site-packages/packtPublishingFreeEbook.py", line 62, in packt_cli
    mb = MailBook(config_file_path)
  File "/home/oracle/.virtualenvs/packt/lib/python3.7/site-packages/utils/mail.py", line 24, in __init__
    config = configparser.ConfigParser(defaults=defaults)
  File "/usr/lib/python3.7/configparser.py", line 638, in __init__
    self._read_defaults(defaults)
  File "/usr/lib/python3.7/configparser.py", line 1216, in _read_defaults
    self.read_dict({self.default_section: defaults})
  File "/usr/lib/python3.7/configparser.py", line 753, in read_dict
    self.set(section, key, value)
  File "/usr/lib/python3.7/configparser.py", line 1197, in set
    self._validate_value_types(option=option, value=value)
  File "/usr/lib/python3.7/configparser.py", line 1182, in _validate_value_types
    raise TypeError("option values must be strings")
TypeError: option values must be strings

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/oracle/.virtualenvs/packt/bin/packt-cli", line 10, in <module>
    sys.exit(packt_cli())
  File "/home/oracle/.virtualenvs/packt/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/oracle/.virtualenvs/packt/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/oracle/.virtualenvs/packt/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/oracle/.virtualenvs/packt/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/oracle/.virtualenvs/packt/lib/python3.7/site-packages/packtPublishingFreeEbook.py", line 123, in packt_cli
    mb = MailBook(config_file_path)
  File "/home/oracle/.virtualenvs/packt/lib/python3.7/site-packages/utils/mail.py", line 24, in __init__
    config = configparser.ConfigParser(defaults=defaults)
  File "/usr/lib/python3.7/configparser.py", line 638, in __init__
    self._read_defaults(defaults)
  File "/usr/lib/python3.7/configparser.py", line 1216, in _read_defaults
    self.read_dict({self.default_section: defaults})
  File "/usr/lib/python3.7/configparser.py", line 753, in read_dict
    self.set(section, key, value)
  File "/usr/lib/python3.7/configparser.py", line 1197, in set
    self._validate_value_types(option=option, value=value)
  File "/usr/lib/python3.7/configparser.py", line 1182, in _validate_value_types
    raise TypeError("option values must be strings")
TypeError: option values must be strings