8000 datasource item nullable project · Issue #1210 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

datasource item nullable project #1210

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

Open
peter-malcolm-bw opened this issue Mar 20, 2023 · 1 comment
Open

datasource item nullable project #1210

peter-malcolm-bw opened this issue Mar 20, 2023 · 1 comment
Labels
0.26 bug in-progress Issues that are in-progress of being fixed

Comments

@peter-malcolm-bw
Copy link

Describe the bug
A clear and concise description of what the bug is.

Versions
Details of your environment, including:

  • Tableau Server version (or note if using Tableau Online) - Tableau Online
  • Python version: 3.9.12
  • TSC library version: 0.24

To Reproduce
Steps to reproduce the behaviour. Please include a code snippet where possible.

import tableauserverclient as TSC

# log in to tableau server 

for datasource in TSC.Pager(server.datasources):
      print(datasource)

The error can be fixed by removing one line from datasource_item.py:

class DatasourceItem(object):
    
    ...
    
    @project_id.setter
    #@property_not_nullable  # TODO: remove this line 
    def project_id(self, value: str):
        self._project_id = value

Results
What are the results or error messages received?

src/tableau_bot/refresh.py:142: in tableau_refresh
    for datasource in Pager(server.datasources):
../../Library/Caches/pypoetry/virtualenvs/tableau-bot-sFRF_OxE-py3.9/lib/python3.9/site-packages/tableauserverclient/server/pager.py:40: in __iter__
    current_item_list, last_pagination_item = self._endpoint(self._options)
../../Library/Caches/pypoetry/virtualenvs/tableau-bot-sFRF_OxE-py3.9/lib/python3.9/site-packages/tableauserverclient/server/endpoint/endpoint.py:205: in wrapper
    return func(self, *args, **kwargs)
../../Library/Caches/pypoetry/virtualenvs/tableau-bot-sFRF_OxE-py3.9/lib/python3.9/site-packages/tableauserverclient/server/endpoint/datasources_endpoint.py:77: in get
    all_datasource_items = DatasourceItem.from_response(server_response.content, self.parent_srv.namespace)
../../Library/Caches/pypoetry/virtualenvs/tableau-bot-sFRF_OxE-py3.9/lib/python3.9/site-packages/tableauserverclient/models/datasource_item.py:331: in from_response
    datasource_item = cls(project_id)
../../Library/Caches/pypoetry/virtualenvs/tableau-bot-sFRF_OxE-py3.9/lib/python3.9/site-packages/tableauserverclient/models/datasource_item.py:58: in __init__
    self.project_id = project_id
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tableauserverclient.models.datasource_item.DatasourceItem object at 0x10995cdf0>, value = None

    @wraps(func)
    def wrapper(self, value):
        if value is None:
            error = "{0} must be defined.".format(func.__name__)
>           raise ValueError(error)
E           ValueError: project_id must be defined.

NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.

@jacalata jacalata added bug in-progress Issues that are in-progress of being fixed labels Mar 25, 2023
@jacalata
Copy link
Contributor

yep - this should be simple enough to get in a new release very soon.

jacalata added a commit that referenced this issue Apr 12, 2023
jacalata added a commit that referenced this issue Apr 13, 2023
@jacalata jacalata added the 0.26 label Apr 19, 2023
jacalata added a commit that referenced this issue Apr 19, 2023
jacalata added a commit that referenced this issue Apr 24, 2023
TableauIDWithMFA added to the user_item model to allow creating users on Tableau Cloud with MFA enabled (#1217)
Run long requests on second thread (#1212)
#1210
#1087
#1058
#456
#1209
update datasource to use bridge (#1224)


Co-authored-by: Tim Payne <47423639+ma7tcsp@users.noreply.github.com>
jacalata added a commit that referenced this issue Sep 22, 2023
* fix: TableauIDWithMFA added to the user_item model to allow creating users on Tableau Cloud with MFA enabled (#1216)
* fix: make project optional in datasources #1210
* fix: allow setting timeout on workbook endpoint #1087
* fix: can't certify datasource on publish #1058 
* fix filter in operator spaces bug (#1259)
* fix: remove logging configuration from TSC (#1248)
* Hotfix schedule_item.py for issue 1237 (#1239), Remove duplicate assignments to fields (#1244)
* Fix shared attribute for custom views (#1280)

New functionality
* enable filtering for Excel downloads #1209, #1281
* query view by content url #456  
* update datasource to use bridge (#1224)
* Add JWTAuth, add repr using qualname
* Add publish samples attribute (#1264)
* add support for custom schedules in TOL (#1273)
* Enable asJob for group update (#1276)


Co-authored-by: Tim Payne <47423639+ma7tcsp@users.noreply.github.com>
Co-authored-by: Lars Breddemann <139097050+LarsBreddemann@users.noreply.github.com>
Co-authored-by: jorwoods <jorwoods@users.noreply.github.com>
Co-authored-by: Austin <110413815+austinpeters-gohealthuccom@users.noreply.github.com>
Co-authored-by: Yasuhisa Yoshida <syou6162@gmail.com>
Co-authored-by: Brian Cantoni <bcantoni@salesforce.com>
Co-authored-by: a-torres-2 <142839181+a-torres-2@users.noreply.github.com>
Co-authored-by: Łukasz Włodarczyk <lukasz@pushmetrics.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.26 bug in-progress Issues that are in-progress of being fixed
Projects
None yet
Development

No branches or pull requests

2 participants
0