Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Data Target Job - AttributeError: 'StringVar' object has no attribute 'startswith' #507

Closed
nathanielfernandez opened this issue Aug 20, 2024 · 1 comment
Labels
integration: contrib Contrib related issues and PRs type: bug Issues/PRs addressing a bug.

Comments

@nathanielfernandez
Copy link

nathanielfernandez commented Aug 20, 2024

Environment

  • Python version: 3.11
  • Nautobot version: 2.1.5
  • nautobot-ssot version: 2.2.0

Thread in #nautobot: https://networktocode.slack.com/archives/C01NWPK6WHL/p1724054957478579

I wanted to try the example data target job that is provided by default with the nautobot-app-ssot.
I tried to supply the URL and token for target instances like the demo instance and our own nautobot instances. Made sure the proper url with protocol (https://) is provided.

I got an error related to the URL.

AttributeError: 'StringVar' object has no attribute 'startswith'

  File "/opt/nautobot/lib64/python3.11/site-packages/nautobot_ssot/jobs/examples.py", line 405, in __init__
    if not url.startswith("http"):
           ^^^^^^^^^^^^^^
AttributeError: 'StringVar' object has no attribute 'startswith'

I thought there was nothing wrong with the URL I provided. So for troubleshooting, I tried to play with the nautobot-ssot files and removed the if condition to bypass it. I still got an error with the URL.

requests.exceptions.MissingSchema: Invalid URL '<nautobot.extras.jobs.StringVar object at 0x7fd2b96355d0>/api/dcim/location-types/': No scheme supplied. Perhaps you meant https://<nautobot.extras.jobs.StringVar object at 0x7fd2b96355d0>/api/dcim/location-types/?

Asked for help in slack, and Justin Drew advised to open an issue.

image

Steps to Reproduce

  1. Make sure the example jobs are not hidden, and the data target job is also enabled.
  2. Run the Example Data Target job, provide the proper URL and token.
  3. It would error right away about the URL
@jdrew82 jdrew82 added type: bug Issues/PRs addressing a bug. integration: contrib Contrib related issues and PRs labels Aug 21, 2024
This was referenced Aug 23, 2024
@Renrut5
Copy link
Contributor

Renrut5 commented Aug 26, 2024

@jdrew82 it looks like this one is completed, in #519 but not closed.

@jdrew82 jdrew82 closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: contrib Contrib related issues and PRs type: bug Issues/PRs addressing a bug.
Projects
None yet
Development

No branches or pull requests

3 participants