ADA Lovelace
Regular Member
- Jan 24, 2021
- 466
- 381
I installed python 3.10, installed panda & openai modules. I created a .py file with the code and added the openai api.
But when i try to open the .py this close inmediatley. I created a folder where i have the .py and the .csv
Why this close inmediatley when i open it?
I tried to open .py file with cmd but i have this error
But when i try to open the .py this close inmediatley. I created a folder where i have the .py and the .csv
Why this close inmediatley when i open it?
I tried to open .py file with cmd but i have this error
Code:
Traceback (most recent call last):
File "C:\Users\X\Desktop\Content\main2.py", line 13, in <module>
prompt = f"Please write a detailed article about {row['topic']}. Use this information to write the article: {row['context']}"
File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\series.py", line 981, in __getitem__
return self._get_value(key)
File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\series.py", line 1089, in _get_value
loc = self.index.get_loc(label)
File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\indexes\base.py", line 3805, in get_loc
raise KeyError(key) from err
KeyError: 'topic'
Last edited: