singer-io / tap-exacttarget

A Singer.io tap for extracting data from the ExactTarget/Salesforce Marketing Cloud API.
GNU Affero General Public License v3.0
14 stars 34 forks source link

Few things I had to do to run the tap in discover mode on my local machine #88

Closed RaviTezu closed 1 year ago

RaviTezu commented 2 years ago

Hello 👋

Thank you for maintaining this repo 🙌 I had to do some extra steps to run the tap in discover mode and I am raising this issue hoping it may help others.

Python version used: 3.9.12

when I tried to run the pip install . it failed with the below error:

Processing /Users/ravitezu/sources/github.com/tap-exacttarget
  Preparing metadata (setup.py) ... done
Collecting funcy==1.9.1
  Downloading funcy-1.9.1.tar.gz (29 kB)
  Preparing metadata (setup.py) ... done
Collecting singer-python==5.12.1
  Downloading singer-python-5.12.1.tar.gz (27 kB)
  Preparing metadata (setup.py) ... done
Collecting python-dateutil==2.6.0
  Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 194.4/194.4 kB 6.8 MB/s eta 0:00:00
Collecting voluptuous==0.10.5
  Downloading voluptuous-0.10.5.tar.gz (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.4/41.4 kB 1.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting Salesforce-FuelSDK==1.3.0
  Downloading Salesforce_FuelSDK-1.3.0-py3-none-any.whl (19 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pyjwt>=1.5.3
  Downloading PyJWT-2.4.0-py3-none-any.whl (18 kB)
Collecting suds-jurko==0.6
  Downloading suds-jurko-0.6.zip (255 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 255.8/255.8 kB 9.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in suds-jurko setup command: use_2to3 is invalid.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

and it order to fix it, I had to install setuptools-58.0.0 using pip install 'setuptools==58.0.0' and pip install . worked after it.

Now when I tried to run the tap in discover mode using tap-exacttarget -c config.json --discover > catalog.json it failed with the below error:

Traceback (most recent call last):
  File "/Users/ravitezu/.virtualenvs/tap-exacttarget/bin/tap-exacttarget", line 5, in <module>
    from tap_exacttarget import main
  File "/Users/ravitezu/.virtualenvs/tap-exacttarget/lib/python3.9/site-packages/tap_exacttarget/__init__.py", line 14, in <module>
    from tap_exacttarget.client import get_auth_stub
  File "/Users/ravitezu/.virtualenvs/tap-exacttarget/lib/python3.9/site-packages/tap_exacttarget/client.py", line 1, in <module>
    import FuelSDK
  File "/Users/ravitezu/.virtualenvs/tap-exacttarget/lib/python3.9/site-packages/FuelSDK/__init__.py", line 4, in <module>
    from FuelSDK.suds_patch import _PropertyAppender
  File "/Users/ravitezu/.virtualenvs/tap-exacttarget/lib/python3.9/site-packages/FuelSDK/suds_patch.py", line 1, in <module>
    from suds.mx.appender import Appender,Content
  File "/Users/ravitezu/.virtualenvs/tap-exacttarget/lib/python3.9/site-packages/suds/__init__.py", line 28, in <module>
    from version import __build__, __version__
ModuleNotFoundError: No module named 'version'

In order to fix the above, error I had to install suds-py3 using pip install suds-py3 and then, I was able to run the tap in discover mode.

I hope it may help others but please feel free to let me know if I can add this somewhere in the repo.

Vi6hal commented 1 year ago

@RaviTezu thanks for sharing this, this is a open bug on the Salesforce FuelSDK repo https://github.com/salesforce-marketingcloud/FuelSDK-Python/issues/135.