Problem description:
The Plaid API’s python client library is named plaid-python
in pypi. However, the package is referred to as plaid
in python code, e.g. import plaid
. See here. As a result, if a repl uses the plaid-python
package, Replit attempts to install the (totally unrelated) python package plaid when the repl’s code is run.
Expected behavior:
Run code without installing the plaid
package. Provide an option to raise an error if the code calls for a package that is not installed instead of automatically attempting a new install.
Actual behavior:
Replit installs the plaid
package with python3 -m poetry add plaid
. The code fails with the following error message:
Traceback (most recent call last):
File "main.py", line 8, in <module>
configuration = plaid.Configuration(
AttributeError: module 'plaid' has no attribute 'Configuration'. Did you mean: 'configuration'?
Steps to reproduce:
- Create new repl using the Python template.
- Add
plaid-python
as a package dependency. - In
main.py
, put the following code and hitRun
:
import plaid
from plaid.api import plaid_api
# Available environments are
# 'Production'
# 'Development'
# 'Sandbox'
configuration = plaid.Configuration(
host=plaid.Environment.Sandbox,
api_key={
'clientId': client_id,
'secret': secret,
}
)
api_client = plaid.ApiClient(configuration)
client = plaid_api.PlaidApi(api_client)
Bug appears at this link:
– removed join link, only post repl link –
Browser/OS/Device:
Chrome/MacOS Ventura/Macbook