{"action":"created","issue":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/5887","repository_url":"https://api.github.com/repos/SatelliteQE/robottelo","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/5887/labels{/name}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/5887/comments","events_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/5887/events","html_url":"https://github.com/SatelliteQE/robottelo/issues/5887","id":309310164,"number":5887,"title":"[py3.6] _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)","user":{"login":"rplevka","id":11773362,"avatar_url":"https://avatars0.githubusercontent.com/u/11773362?v=4","gravatar_id":"","url":"https://api.github.com/users/rplevka","html_url":"https://github.com/rplevka","followers_url":"https://api.github.com/users/rplevka/followers","following_url":"https://api.github.com/users/rplevka/following{/other_user}","gists_url":"https://api.github.com/users/rplevka/gists{/gist_id}","starred_url":"https://api.github.com/users/rplevka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rplevka/subscriptions","organizations_url":"https://api.github.com/users/rplevka/orgs","repos_url":"https://api.github.com/users/rplevka/repos","events_url":"https://api.github.com/users/rplevka/events{/privacy}","received_events_url":"https://api.github.com/users/rplevka/received_events","type":"User","site_admin":false},"labels":[{"id":468870824,"url":"https://api.github.com/repos/SatelliteQE/robottelo/labels/6.2","name":"6.2","color":"f9d0c4","default":false},{"id":468870987,"url":"https://api.github.com/repos/SatelliteQE/robottelo/labels/6.3","name":"6.3","color":"e99695","default":false},{"id":882222241,"url":"https://api.github.com/repos/SatelliteQE/robottelo/labels/6.4","name":"6.4","color":"efd3aa","default":false},{"id":85367663,"url":"https://api.github.com/repos/SatelliteQE/robottelo/labels/Urgent","name":"Urgent","color":"e11d21","default":false},{"id":517125937,"url":"https://api.github.com/repos/SatelliteQE/robottelo/labels/test-failure","name":"test-failure","color":"ffcccc","default":false}],"state":"open","locked":false,"assignee":{"login":"rplevka","id":11773362,"avatar_url":"https://avatars0.githubusercontent.com/u/11773362?v=4","gravatar_id":"","url":"https://api.github.com/users/rplevka","html_url":"https://github.com/rplevka","followers_url":"https://api.github.com/users/rplevka/followers","following_url":"https://api.github.com/users/rplevka/following{/other_user}","gists_url":"https://api.github.com/users/rplevka/gists{/gist_id}","starred_url":"https://api.github.com/users/rplevka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rplevka/subscriptions","organizations_url":"https://api.github.com/users/rplevka/orgs","repos_url":"https://api.github.com/users/rplevka/repos","events_url":"https://api.github.com/users/rplevka/events{/privacy}","received_events_url":"https://api.github.com/users/rplevka/received_events","type":"User","site_admin":false},"assignees":[{"login":"rplevka","id":11773362,"avatar_url":"https://avatars0.githubusercontent.com/u/11773362?v=4","gravatar_id":"","url":"https://api.github.com/users/rplevka","html_url":"https://github.com/rplevka","followers_url":"https://api.github.com/users/rplevka/followers","following_url":"https://api.github.com/users/rplevka/following{/other_user}","gists_url":"https://api.github.com/users/rplevka/gists{/gist_id}","starred_url":"https://api.github.com/users/rplevka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rplevka/subscriptions","organizations_url":"https://api.github.com/users/rplevka/orgs","repos_url":"https://api.github.com/users/rplevka/repos","events_url":"https://api.github.com/users/rplevka/events{/privacy}","received_events_url":"https://api.github.com/users/rplevka/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-03-28T10:33:01Z","updated_at":"2018-03-28T14:05:18Z","closed_at":null,"author_association":"MEMBER","body":"This is a issue to track all tests failing with the [subject]\r\n\r\n```python\r\n        # download the organization subscriptions\r\n        org_subs_csv_local_file_path = os.path.join(\r\n            tempfile.gettempdir(), org_subs_csv_filename)\r\n        download_file(\r\n            org_subs_csv_remote_file_path, org_subs_csv_local_file_path)\r\n        _, org_subscriptions = self._read_csv_file(\r\n>           org_subs_csv_local_file_path)\r\n```\r\n<more details to be provided by @rplevka>"},"comment":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/comments/376898901","html_url":"https://github.com/SatelliteQE/robottelo/issues/5887#issuecomment-376898901","issue_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/5887","id":376898901,"user":{"login":"ldjebran","id":131553,"avatar_url":"https://avatars2.githubusercontent.com/u/131553?v=4","gravatar_id":"","url":"https://api.github.com/users/ldjebran","html_url":"https://github.com/ldjebran","followers_url":"https://api.github.com/users/ldjebran/followers","following_url":"https://api.github.com/users/ldjebran/following{/other_user}","gists_url":"https://api.github.com/users/ldjebran/gists{/gist_id}","starred_url":"https://api.github.com/users/ldjebran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldjebran/subscriptions","organizations_url":"https://api.github.com/users/ldjebran/orgs","repos_url":"https://api.github.com/users/ldjebran/repos","events_url":"https://api.github.com/users/ldjebran/events{/privacy}","received_events_url":"https://api.github.com/users/ldjebran/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T14:05:18Z","updated_at":"2018-03-28T14:05:18Z","author_association":"CONTRIBUTOR","body":"we have to update the read and write to be withjout the \"b\" for byte\r\nand update like this (that should fix the issue)\r\n```python\r\n    @staticmethod\r\n    def _read_csv_file(file_path):\r\n        \"\"\"Read a csv file as a dictionary\r\n\r\n        :param str file_path: The file location path to read as csv\r\n\r\n        :returns a tuple (list, list[dict]) that represent field_names, data\r\n        \"\"\"\r\n        csv_data = []\r\n        with open(file_path, 'r') as csv_file:\r\n            csv_reader = csv.DictReader(csv_file, delimiter=',')\r\n            field_names = csv_reader.fieldnames\r\n            for csv_row in csv_reader:\r\n                csv_data.append(csv_row)\r\n        return field_names, csv_data\r\n\r\n    @staticmethod\r\n    def _write_csv_file(file_path, filed_names, csv_data):\r\n        \"\"\"Write to csv file\r\n\r\n        :param str file_path: The file location path to write as csv\r\n        :param list filed_names: The field names to be written\r\n        :param list[dict] csv_data: the list dict data to be saved\r\n        \"\"\"\r\n        with open(file_path, 'w') as csv_file:\r\n            csv_writer = csv.DictWriter(csv_file, filed_names, delimiter=',')\r\n            csv_writer.writeheader()\r\n            for csv_row in csv_data:\r\n                csv_writer.writerow(csv_row)\r\n```\r\nThis is also related to https://github.com/SatelliteQE/robottelo/issues/5867\r\n"}}
{"actor":{"display_login":"ldjebran"}}