-1

I am trying to scrape a Tableau Dashboard using the TableauScraper package in Python.

from tableauscraper import TableauScracper as TS
test_url= "https://tableau.***.***/#/site/CP/views/StringencyTrackers_ValidV1/Contributionbarchart?:iid=1"
ts=TS()
ts.loads(test_url)

Finishes with the error: AttributeError: 'NoneType' object has no attribute 'text'

Any idea why? Or how to fix?

This code runs fine and only change a few characters in the url link:

NASMap_url = "https://tableau.***.***/t/_AJRGPerfAnalysis/views/StringencyTrackers/NASMap?%3Aembed=y"
ts = TS()
ts.loads(NASMap_url)

It is obviously something with the url, but I don't know enough about website coding or urls in general to know where to start. Both sites are locked behind a firewall that requires VPN access. But since the second link works, the first should as well? Any help would be appreciated!

mlf
  • 41
  • 4
  • 1
    Please show the full error message. – Ali Irani Jun 18 '21 at 18:05
  • Note that you are missing an 'l' in `ts.loads(test_ur)`. – Shradha Jun 18 '21 at 18:08
  • @mlf are you sure about the `#` in the url ? – Bertrand Martel Jun 19 '21 at 02:40
  • @BertrandMartel I'm certain that it's in the address bar link for the dashboard I'm using, but not certain why it's there and not in the other link. I thought that might be part of my issue but really am not familiar enough with web pages, or Tableau server, to know what the difference is in the # character versus the 't'. – mlf Jun 21 '21 at 13:55
  • @Shradha thanks for noticing! That was just a copying error on my part; the 'l' was in the actual code that is still producing an error. – mlf Jun 21 '21 at 13:56
  • @AliIrani added the message I'm getting to the post. "AttributeError: 'NoneType' object has no attribute 'text'" – mlf Jun 21 '21 at 13:57
  • @mlf checkout the network tab of chrome dev console, search for a link with `embed=y` parameter – Bertrand Martel Jun 21 '21 at 18:39

1 Answers1

0

The issue did end up being about the '#' in the URL. Changing the /#/site to /t/ solved all of my issues. It appears to be an alias/communication issue between in RServer. Thanks for all the help!

mlf
  • 41
  • 4