singer-io / tap-exchangeratesapi

A Singer Tap to extract currency exchange rate data from exchangeratesapi.io.
GNU Affero General Public License v3.0
2 stars 27 forks source link

Fix version incompatibility issue #1

Closed maxg203 closed 6 years ago

maxg203 commented 6 years ago

This package does not work with older versions of the singer-python package. Ensure this package is required as part of future installations (or using pip's --upgrade flag).

This fix avoids tracebacks such as the following:

root@e61cc5f7db82:/usr/local/project# tap-exchangeratesapi | target-csv
Traceback (most recent call last):
  File "/usr/local/bin/tap-exchangeratesapi", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/tap_exchangeratesapi.py", line 102, 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'
cmerrick commented 6 years ago

Hi @maxg203, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

cmerrick commented 6 years ago

You did it @maxg203!

Thank you for signing the Singer Contribution License Agreement.

nick-mccoy commented 6 years ago

Hey @maxg203 - thanks for catching this.

Can you modify this slightly to pin the version to 5.3.3 instead of using >= notation. See this best practice in our docs for more info.

'singer-python==5.3.3'

Also, I noticed you are running your tap and target in the same environment. To avoid dependency issues, we recommend using separate virtual environments for the tap and target. See this section of the singer docs for instructions.

maxg203 commented 6 years ago

@nick-mccoy Makes sense, thanks for the info. I've made that change.