singer-io / target-csv

Write Singer data to CSV files
GNU Affero General Public License v3.0
37 stars 68 forks source link

Why target-csv project depend on singer-python==2.1.4 while current singer-python version is v5.8.1 ? #23

Open stephane-klein opened 5 years ago

stephane-klein commented 5 years ago

Why target-csv project depend on singer-python==2.1.4 while current singer-python version is v5.8.1 ?

Best regards, Stéphane

luandy64 commented 4 years ago

We pinned the versions of dependancies to whatever works at the time off writing the target. Since there's no reason to bump the singer-python version, we didn't.

If this is an issue you run into while trying to run the target with newer taps, please set up the target and the tap in their own virtual environments.

sergey-vin commented 4 years ago

Hi! Yes, this is actually a bigger issue, given that even a command advertised on a main website https://www.singer.io/#what-it-is is not working any longer:

> pip install target-csv tap-exchangeratesapi
> tap-exchangeratesapi | target-csv

won't work, as target-csv and tap-exchangeratesapi require different versions of singer-python.

More details:

$ docker run -it python:3 /bin/bash
root@e1e3a1ce94c2:/# pip install target-csv tap-exchangeratesapi
Collecting target-csv
  Downloading target-csv-0.3.0.tar.gz (4.0 kB)
Collecting tap-exchangeratesapi
  Downloading tap-exchangeratesapi-0.1.1.tar.gz (2.4 kB)
...
tap-exchangeratesapi 0.1.1 requires singer-python==5.3.3, but you'll have singer-python 2.1.4 which is incompatible.
Successfully installed backoff-1.3.2 certifi-2020.6.20 chardet-3.0.4 idna-2.8 jsonschema-2.6.0 pendulum-1.2.0 python-dateutil-2.8.1 pytz-2020.1 pytzdata-2020.1 r
equests-2.21.0 simplejson-3.11.1 singer-python-2.1.4 six-1.15.0 tap-exchangeratesapi-0.1.1 target-csv-0.3.0 tzlocal-2.1 urllib3-1.24.3
root@e1e3a1ce94c2:/# tap-exchangeratesapi | target-csv
Traceback (most recent call last):
  File "/usr/local/bin/tap-exchangeratesapi", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/tap_exchangeratesapi/__init__.py", line 113, in main
    start_date = singer.utils.strptime_with_tz(start_date).date().strftime(DATE_FORMAT)
AttributeError: module 'singer.utils' has no attribute 'strptime_with_tz'
INFO Sending version information to singer.io. To disable sending anonymous usage data, set the config parameter "disable_collection" to true

An issue was wrongly opened for https://github.com/singer-io/tap-exchangeratesapi/issues/6 on that, but it's better to update target-csv.

If you don't mind, please update it. It's the best practice to update software to the latest versions.

Matthews3301 commented 3 years ago

Possibly can be solved by running tap-exchangeratesapi and target-csv in separate virtual environments.

python3 -m venv ~/.virtualenvs/tap-exchangeratesapi
source ~/.virtualenvs/tap-exchangeratesapi/bin/activate
pip install tap-exchangeratesapi
deactivate

python3 -m venv ~/.virtualenvs/target-csv
source ~/.virtualenvs/target-csv/bin/activate
pip install target-csv
deactivate

~/.virtualenvs/tap-exchangeratesapi/bin/tap-exchangeratesapi | ~/.virtualenvs/target-csv/bin/target-csv

ivo-skyway commented 2 years ago

I think the root problem are some changes in the exchangerates API keys. Even with 2 venv I am getting KeyError: 'rates'.