$ llamaindex-cli-tool.exe upgrade file.py Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "...\venv\Scripts\cli-tool.exe\__main__.py", line 4, in <module> File "...\venv\Lib\site-packages\package\cli\command_line.py", line 4, in <module> from package.cli.module import ModuleCLI, default_modulecli_persist_dir File "...\venv\Lib\site-packages\package\cli\module\__init__.py", line 1, in <module> from package.cli.module.base import ModuleCLI, default_modulecli_persist_dir File "...\venv\Lib\site-packages\package\cli\module\base.py", line 9, in <module> from package.core import ( ImportError: cannot import name 'SimpleDirectoryReader' from 'package.core' (unknown location)
llama-hub==0.0.79.post1 llama-index==0.10.14 llama-index-agent-openai==0.1.5 llama-index-cli==0.1.7 llama-index-core==0.10.14.post1 llama-index-embeddings-openai==0.1.6 llama-index-indices-managed-llama-cloud==0.1.3 llama-index-legacy==0.9.48 llama-index-llms-openai==0.1.7 llama-index-multi-modal-llms-openai==0.1.4 llama-index-program-openai==0.1.4 llama-index-question-gen-openai==0.1.3 llama-index-readers-file==0.1.6 llama-index-readers-llama-parse==0.1.3 llama-index-vector-stores-chroma==0.1.5 llama-parse==0.3.5 llamaindex-py-client==0.1.13
Since v0.10 makes use of Python namespace packages, and v0.9.xx or earlier does not, any remnants of legacy llama-index will surely break import paths and cause errors.
Module not found: BaseEmbedding as llama_index_BaseEmbedding Switching to core Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "...\venv2\Scripts\llamaindex-cli.exe\__main__.py", line 7, in <module> File "...\venv2\Lib\site-packages\llama_index\cli\command_line.py", line 269, in main args.func(args) File "...\venv2\Lib\site-packages\llama_index\cli\command_line.py", line 227, in <lambda> upgrade_parser.set_defaults(func=lambda args: upgrade_dir(args.directory)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...\venv2\Lib\site-packages\llama_index\cli\upgrade\base.py", line 287, in upgrade_dir upgrade_file(str(file_ref)) File "...\venv2\Lib\site-packages\llama_index\cli\upgrade\base.py", line 271, in upgrade_file upgrade_py_md_file(file_path) File "...\venv2\Lib\site-packages\llama_index\cli\upgrade\base.py", line 253, in upgrade_py_md_file lines = f.readlines() ^^^^^^^^^^^^^ File "...\Python\Python311\Lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 7704: character maps to <undefined>
it added core in some places and those imports still look broken. If there is something else that needs to be installed it should tell me about that or something.
-- its supposed to print it at the end lol but I guess it broke before it got therellamaindex-cli upgrade-file <file path>
llama-index-llms-azure-openai
from llama_index.llms import AzureOpenAI as llama_index_AzureOpenAI from llama_index.embeddings import AzureOpenAIEmbedding as llama_index_AzureOpenAIEmbedding
from llama_index.core.llms import AzureOpenAI as llama_index_AzureOpenAI from llama_index.core.embeddings import AzureOpenAIEmbedding as llama_index_AzureOpenAIEmbedding
llama-index-llms-azure-openai==0.1.5 llama-index-embeddings-azure-openai==0.1.6
from llama_index.llms.azure_openai import AzureOpenAI as llama_index_AzureOpenAI from llama_index.embeddings.azure_openai import AzureOpenAIEmbedding as llama_index_AzureOpenAIEmbedding