{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/47870","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/47870/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/47870/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/47870/events","html_url":"https://github.com/saltstack/salt/issues/47870","id":327383620,"number":47870,"title":"Modules loading failed with python3","user":{"login":"dosercz","id":1196632,"avatar_url":"https://avatars1.githubusercontent.com/u/1196632?v=4","gravatar_id":"","url":"https://api.github.com/users/dosercz","html_url":"https://github.com/dosercz","followers_url":"https://api.github.com/users/dosercz/followers","following_url":"https://api.github.com/users/dosercz/following{/other_user}","gists_url":"https://api.github.com/users/dosercz/gists{/gist_id}","starred_url":"https://api.github.com/users/dosercz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dosercz/subscriptions","organizations_url":"https://api.github.com/users/dosercz/orgs","repos_url":"https://api.github.com/users/dosercz/repos","events_url":"https://api.github.com/users/dosercz/events{/privacy}","received_events_url":"https://api.github.com/users/dosercz/received_events","type":"User","site_admin":false},"labels":[{"id":71248262,"url":"https://api.github.com/repos/saltstack/salt/labels/Info%20Needed","name":"Info Needed","color":"c7def8","default":false},{"id":77737132,"url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestone/37","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars2.githubusercontent.com/u/702318?v=4","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":1021,"closed_issues":2281,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2018-05-29T16:08:44Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-05-29T15:54:44Z","updated_at":"2018-05-29T16:12:47Z","closed_at":null,"author_association":"NONE","body":"I'm testing salt with python 3 and I have a problem with our custom modules. It was working without any problem with python 2.7. Is there required any changes in config file or is it a bug in salt?\r\n\r\nModuls are called e.g. in jinja templates via `salt['x.y'](args)` and salt returns error: `Unable to manage file: Jinja variable 'salt.utils.templates.AliasedLoader object' has no attribute 'x.y'`\r\n\r\nSync failed too:\r\nRun:\r\nsalt-run saltutil.sync_all\r\nOutput:\r\n[ERROR   ] Failed to sync clouds module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync modules module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync states module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync grains module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync renderers module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync returners module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync output module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync proxy module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync runners module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync wheel module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync engines module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync thorium module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync queues module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync pillar module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync utils module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync sdb module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync cache module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync fileserver module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync tops module: string argument expected, got 'bytes'\r\n[ERROR   ] Failed to sync tokens module: string argument expected, got 'bytes'\r\n...\r\n\r\nSalt master error log:\r\n[ERROR   ] Error in function _file_list:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3/dist-packages/salt/master.py\", line 1776, in run_func\r\n    ret = getattr(self, func)(load)\r\n  File \"/usr/lib/python3/dist-packages/salt/utils/decorators/__init__.py\", line 597, in wrapped\r\n    return function(*args, **kwargs)\r\n  File \"/usr/lib/python3/dist-packages/salt/fileserver/__init__.py\", line 752, in file_list\r\n    ret.update(self.servers[fstr](load))\r\n  File \"/usr/lib/python3/dist-packages/salt/fileserver/gitfs.py\", line 185, in file_list\r\n    return _gitfs().file_list(load)\r\n  File \"/usr/lib/python3/dist-packages/salt/utils/gitfs.py\", line 2909, in file_list\r\n    return self._file_lists(load, 'files')\r\n  File \"/usr/lib/python3/dist-packages/salt/utils/gitfs.py\", line 2886, in _file_lists\r\n    repo_files, repo_symlinks = repo.file_list(load['saltenv'])\r\n  File \"/usr/lib/python3/dist-packages/salt/utils/gitfs.py\", line 1286, in file_list\r\n    file_blob.stream_data(stream)\r\n  File \"/usr/lib/python3/dist-packages/git/objects/base.py\", line 119, in stream_data\r\n    stream_copy(istream, ostream)\r\n  File \"/usr/lib/python3/dist-packages/git/util.py\", line 127, in stream_copy\r\n    destination.write(chunk)\r\n\r\n### Setup\r\nsalt master config for modules:\r\nextension_modules: /srv/modules/\r\n/srv/modules and /srv/modules/modules are simlinks to dir with our modules (*.py files)\r\n\r\n### Versions Report\r\nSalt minion is on the same server as salt master and in the same version:\r\nSalt Version:\r\n           Salt: 2018.3.0\r\n\r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: 2.5.3\r\n      docker-py: Not Installed\r\n          gitdb: 2.0.0\r\n      gitpython: 2.1.1\r\n          ioflo: Not Installed\r\n         Jinja2: 2.9.4\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: Not Installed\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.8\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n   pycryptodome: Not Installed\r\n         pygit2: Not Installed\r\n         Python: 3.5.3 (default, Jan 19 2017, 14:11:04)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.12\r\n          PyZMQ: 16.0.2\r\n           RAET: Not Installed\r\n          smmap: 2.0.1\r\n        timelib: Not Installed\r\n        Tornado: 4.4.3\r\n            ZMQ: 4.2.1\r\n\r\nSystem Versions:\r\n           dist: debian 9.4\r\n         locale: UTF-8\r\n        machine: x86_64\r\n        release: 4.9.0-6-amd64\r\n         system: Linux\r\n        version: debian 9.4"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/392836367","html_url":"https://github.com/saltstack/salt/issues/47870#issuecomment-392836367","issue_url":"https://api.github.com/repos/saltstack/salt/issues/47870","id":392836367,"user":{"login":"garethgreenaway","id":718525,"avatar_url":"https://avatars0.githubusercontent.com/u/718525?v=4","gravatar_id":"","url":"https://api.github.com/users/garethgreenaway","html_url":"https://github.com/garethgreenaway","followers_url":"https://api.github.com/users/garethgreenaway/followers","following_url":"https://api.github.com/users/garethgreenaway/following{/other_user}","gists_url":"https://api.github.com/users/garethgreenaway/gists{/gist_id}","starred_url":"https://api.github.com/users/garethgreenaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethgreenaway/subscriptions","organizations_url":"https://api.github.com/users/garethgreenaway/orgs","repos_url":"https://api.github.com/users/garethgreenaway/repos","events_url":"https://api.github.com/users/garethgreenaway/events{/privacy}","received_events_url":"https://api.github.com/users/garethgreenaway/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T16:12:47Z","updated_at":"2018-05-29T16:12:47Z","author_association":"MEMBER","body":"@dosercz I haven't been able to reproduce this particular issue.  Can you provide a copy of your custom module that is seemingly causing the issue?  Another question, do you see the same errors if you don't have the custom module in place?"}}
{"actor":{"display_login":"garethgreenaway"}}