{"action":"opened","issue":{"url":"https://api.github.com/repos/akretion/mdfelib/issues/1","repository_url":"https://api.github.com/repos/akretion/mdfelib","labels_url":"https://api.github.com/repos/akretion/mdfelib/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/akretion/mdfelib/issues/1/comments","events_url":"https://api.github.com/repos/akretion/mdfelib/issues/1/events","html_url":"https://github.com/akretion/mdfelib/issues/1","id":307104457,"number":1,"title":"Falha na exportação de algumas tags","user":{"login":"mileo","id":1975978,"avatar_url":"https://avatars2.githubusercontent.com/u/1975978?v=4","gravatar_id":"","url":"https://api.github.com/users/mileo","html_url":"https://github.com/mileo","followers_url":"https://api.github.com/users/mileo/followers","following_url":"https://api.github.com/users/mileo/following{/other_user}","gists_url":"https://api.github.com/users/mileo/gists{/gist_id}","starred_url":"https://api.github.com/users/mileo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mileo/subscriptions","organizations_url":"https://api.github.com/users/mileo/orgs","repos_url":"https://api.github.com/users/mileo/repos","events_url":"https://api.github.com/users/mileo/events{/privacy}","received_events_url":"https://api.github.com/users/mileo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-21T02:49:51Z","updated_at":"2018-03-21T02:49:51Z","closed_at":null,"author_association":"NONE","body":"Estou tentando gerar um XML e estou com problemas nas TAGs verProc e xMunCarrega.\r\n\r\nNão sei dizer se é um problema nas lib ou eu que estou usando a lib de forma incorreta.\r\n\r\nAgradeço qualquer ajuda.\r\n\r\nhttps://github.com/akretion/mdfelib/blob/generated/mdfelib/v3_00/mdfeTiposBasico.py#L1555\r\nhttps://github.com/akretion/mdfelib/blob/generated/mdfelib/v3_00/mdfeTiposBasico.py#L1703\r\n\r\nfmdf\r\n\r\n```\r\nIn [22]: import sys\r\n    ...: from mdfelib.v3_00.mdfeTiposBasico import ide\r\n    ...: from mdfelib.v3_00.mdfeTiposBasico import infMunCarrega\r\n    ...: from mdfelib.v3_00.mdfeTiposBasico import tot\r\n    ...: from mdfelib.v3_00.mdfeTiposBasico import verProc\r\n    ...: \r\n    ...: carregamento = infMunCarrega(cMunCarrega=2305506,xMunCarrega='TESTE')\r\n    ...: \r\n    ...: ver_proc = verProc()\r\n    ...: # TODO: Corrigir o ver_proc pois eu não consegui, segui em frente.\r\n    ...: # ver_proc\r\n    ...: identificacao = ide()\r\n    ...: identificacao.cUF = 23\r\n    ...: identificacao.tpAmb = 2\r\n    ...: identificacao.mod = '1'\r\n    ...: identificacao.serie = '1'\r\n    ...: identificacao.nMDF = '1'\r\n    ...: identificacao.cMDF= '00004894'\r\n    ...: identificacao.cDV = 4\r\n    ...: identificacao.modal = 1\r\n    ...: identificacao.dhEmi = '2017-10-02T18:05:55-03:00'\r\n    ...: identificacao.tpEmis = 1\r\n    ...: identificacao.procEmi = '0'\r\n    ...: identificacao.verProc = ver_proc\r\n    ...: identificacao.UFIni = 'CE'\r\n    ...: identificacao.UFFim = 'CE'\r\n    ...: identificacao.infMunCarrega.append(carregamento)\r\n    ...: identificacao.export(sys.stdout, 0)\r\n    ...: \r\n<ide>\r\n    <cUF>23</cUF>\r\n    <tpAmb>2</tpAmb>\r\n    <mod>1</mod>\r\n    <serie>1</serie>\r\n    <nMDF>1</nMDF>\r\n    <cMDF>00004894</cMDF>\r\n    <cDV>4</cDV>\r\n    <modal>1</modal>\r\n    <dhEmi>2017-10-02T18:05:55-03:00</dhEmi>\r\n    <tpEmis>1</tpEmis>\r\n    <procEmi>0</procEmi>\r\n    <verProc/>\r\n    <UFIni>CE</UFIni>\r\n    <UFFim>CE</UFFim>\r\n    <infMunCarrega>\r\n        <cMunCarrega>2305506</cMunCarrega>\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-22-c9f2f19bdffc> in <module>()\r\n     26 identificacao.UFFim = 'CE'\r\n     27 identificacao.infMunCarrega.append(carregamento)\r\n---> 28 identificacao.export(sys.stdout, 0)\r\n\r\n/home/mileo/Projects/test/src/mdfelib/mdfelib/v3_00/mdfeTiposBasico.py in export(self, outfile, level, namespace_, name_, namespacedef_, pretty_print)\r\n   1131         if self.hasContent_():\r\n   1132             outfile.write('>%s' % (eol_, ))\r\n-> 1133             self.exportChildren(outfile, level + 1, namespace_='', name_='ide', pretty_print=pretty_print)\r\n   1134             showIndent(outfile, level, pretty_print)\r\n   1135             outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\r\n\r\n/home/mileo/Projects/test/src/mdfelib/mdfelib/v3_00/mdfeTiposBasico.py in exportChildren(self, outfile, level, namespace_, name_, fromsubclass_, pretty_print)\r\n   1191             outfile.write('<%sUFFim>%s</%sUFFim>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.UFFim), input_name='UFFim')), namespace_, eol_))\r\n   1192         for infMunCarrega_ in self.infMunCarrega:\r\n-> 1193             infMunCarrega_.export(outfile, level, namespace_, name_='infMunCarrega', pretty_print=pretty_print)\r\n   1194         for infPercurso_ in self.infPercurso:\r\n   1195             infPercurso_.export(outfile, level, namespace_, name_='infPercurso', pretty_print=pretty_print)\r\n\r\n/home/mileo/Projects/test/src/mdfelib/mdfelib/v3_00/mdfeTiposBasico.py in export(self, outfile, level, namespace_, name_, namespacedef_, pretty_print)\r\n   1661         if self.hasContent_():\r\n   1662             outfile.write('>%s' % (eol_, ))\r\n-> 1663             self.exportChildren(outfile, level + 1, namespace_='', name_='infMunCarrega', pretty_print=pretty_print)\r\n   1664             showIndent(outfile, level, pretty_print)\r\n   1665             outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\r\n\r\n/home/mileo/Projects/test/src/mdfelib/mdfelib/v3_00/mdfeTiposBasico.py in exportChildren(self, outfile, level, namespace_, name_, fromsubclass_, pretty_print)\r\n   1677             outfile.write('<%scMunCarrega>%s</%scMunCarrega>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.cMunCarrega), input_name='cMunCarrega')), namespace_, eol_))\r\n   1678         if self.xMunCarrega is not None:\r\n-> 1679             self.xMunCarrega.export(outfile, level, namespace_, name_='xMunCarrega', pretty_print=pretty_print)\r\n   1680     def build(self, node):\r\n   1681         already_processed = set()\r\n\r\nAttributeError: 'str' object has no attribute 'export'\r\n\r\n```"}}
{"actor":{"display_login":"mileo"}}