mikavehns / BookGPT

Writes complete books with given paramters, using GPT-3.
MIT License
353 stars 66 forks source link

TypeError: 'type' object is not subscriptable #6

Closed noaether closed 1 year ago

noaether commented 1 year ago

Describe the bug TypeError when loading selfimprovement.py

To Reproduce Steps to reproduce the behavior:

  1. Clone repository git clone https://github.com/mikavehns/BookGPT.git
  2. Install requirements pip install -r requirements.txt
  3. Run python run.py
  4. See error

Expected behavior Interactive menu/CLI should appear.

Severity Program does not work at all.

Error Logs Traceback (most recent call last): File "run.py", line 3, in <module> from book import Book File "/home/noa/Documents/BookGPT/src/book.py", line 3, in <module> from categories import * File "/home/noa/Documents/BookGPT/src/categories/__init__.py", line 1, in <module> from .selfimprovement import SelfImprovement File "/home/noa/Documents/BookGPT/src/categories/selfimprovement.py", line 6, in <module> class SelfImprovement: File "/home/noa/Documents/BookGPT/src/categories/selfimprovement.py", line 69, in SelfImprovement def get_structure(self, title: str, chapters: list[str]): TypeError: 'type' object is not subscriptable image

Desktop info

Additional info Using python-is-python3, which means running python run.py actually runs python3 run.py. Ran the screenshot with python3 directly in case that module was at fault.

malore350 commented 1 year ago

You should upgrade your python to >=3.9