Repository: truera/trulens
Issue: TypeError: Dummy.__new__() takes 2 positional arguments but 4 were given
Root cause: External Dependency Breakage

`!pip install trulens_eval`

`from trulens_eval import Feedback, Huggingface, Query`

I'm getting "TypeError: Dummy.__new__() takes 2 positional arguments but 4 were given" while trying to import trulens_eval.

> TypeError                                 Traceback (most recent call last)
> Cell In[15], line 1
> ----> 1 from trulens_eval import Feedback, Huggingface, Query
> 
> File ~/anaconda3/envs/python3/lib/python3.10/site-packages/trulens_eval/__init__.py:96
>      94 from trulens_eval.tru_chain import TruChain
>      95 from trulens_eval.tru_custom_app import TruCustomApp
> ---> 96 from trulens_eval.tru_llama import TruLlama
>      97 from trulens_eval.utils.threading import TP
>      99 __all__ = [
>     100     "Tru",
>     101     "TruBasicApp",
>    (...)
>     114     "TP",
>     115 ]
> 
> File ~/anaconda3/envs/python3/lib/python3.10/site-packages/trulens_eval/tru_llama.py:19
>      17 from trulens_eval.utils.imports import OptionalImports
>      18 from trulens_eval.utils.imports import REQUIREMENT_LLAMA
> ---> 19 from trulens_eval.utils.llama import WithFeedbackFilterNodes
>      20 from trulens_eval.utils.pyschema import Class
>      21 from trulens_eval.utils.pyschema import FunctionOrMethod
> 
> File ~/anaconda3/envs/python3/lib/python3.10/site-packages/trulens_eval/utils/llama.py:119
>     114     view = constructor_of_class(cls)
>     116     return view(json)
> --> 119 class WithFeedbackFilterNodes(VectorIndexRetriever):
>     120     feedback: Feedback
>     121     threshold: float
> 
> TypeError: Dummy.__new__() takes 2 positional arguments but 4 were given

I am getting a similar TypeError:

```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 from trulens_eval import Tru

File ~/venv/lib/python3.9/site-packages/trulens_eval/__init__.py:96
     94 from trulens_eval.tru_chain import TruChain
     95 from trulens_eval.tru_custom_app import TruCustomApp
---> 96 from trulens_eval.tru_llama import TruLlama
     97 from trulens_eval.utils.threading import TP
     99 __all__ = [
    100     "Tru",
    101     "TruBasicApp",
   (...)
    114     "TP",
    115 ]

File ~/venv/lib/python3.9/site-packages/trulens_eval/tru_llama.py:19
     17 from trulens_eval.utils.imports import OptionalImports
     18 from trulens_eval.utils.imports import REQUIREMENT_LLAMA
---> 19 from trulens_eval.utils.llama import WithFeedbackFilterNodes
     20 from trulens_eval.utils.pyschema import Class
     21 from trulens_eval.utils.pyschema import FunctionOrMethod

File ~/venv/lib/python3.9/site-packages/trulens_eval/utils/llama.py:119
    114     view = constructor_of_class(cls)
    116     return view(json)
--> 119 class WithFeedbackFilterNodes(VectorIndexRetriever):
    120     feedback: Feedback
    121     threshold: float

TypeError: __new__() takes 2 positional arguments but 4 were given
```

> I am getting a similar TypeError:
> 
> ```
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call last)
> Cell In[4], line 1
> ----> 1 from trulens_eval import Tru
> 
> File ~/venv/lib/python3.9/site-packages/trulens_eval/__init__.py:96
>      94 from trulens_eval.tru_chain import TruChain
>      95 from trulens_eval.tru_custom_app import TruCustomApp
> ---> 96 from trulens_eval.tru_llama import TruLlama
>      97 from trulens_eval.utils.threading import TP
>      99 __all__ = [
>     100     "Tru",
>     101     "TruBasicApp",
>    (...)
>     114     "TP",
>     115 ]
> 
> File ~/venv/lib/python3.9/site-packages/trulens_eval/tru_llama.py:19
>      17 from trulens_eval.utils.imports import OptionalImports
>      18 from trulens_eval.utils.imports import REQUIREMENT_LLAMA
> ---> 19 from trulens_eval.utils.llama import WithFeedbackFilterNodes
>      20 from trulens_eval.utils.pyschema import Class
>      21 from trulens_eval.utils.pyschema import FunctionOrMethod
> 
> File ~/venv/lib/python3.9/site-packages/trulens_eval/utils/llama.py:119
>     114     view = constructor_of_class(cls)
>     116     return view(json)
> --> 119 class WithFeedbackFilterNodes(VectorIndexRetriever):
>     120     feedback: Feedback
>     121     threshold: float
> 
> TypeError: __new__() takes 2 positional arguments but 4 were given
> ```
@mariaafara 
I was able to bypass this issue using following versions

```
!pip install trulens_eval==0.19.2 openai==1.3.7 bs4
!pip install llama-index
```

@piotrm0 - seems we're still requiring Llama-Index unintentionally. Can you take a look?

@joshreini1
I was able to fix this issue when I installed Llama-Index

!pip install llama-index would do the work for you

This issue is resolved in 0.20.1. Please update and re-open if you have any continued issues.