Title: MySQL - "'ascii' codec can't encode character" with accentuated character in the table name · Issue #37 · unalloc/sqlautocode · GitHub
Open Graph Title: MySQL - "'ascii' codec can't encode character" with accentuated character in the table name · Issue #37 · unalloc/sqlautocode
X Title: MySQL - "'ascii' codec can't encode character" with accentuated character in the table name · Issue #37 · unalloc/sqlautocode
Description: What steps will reproduce the problem? 1. Create a table with an accentuated character in the name, like "pdf_imprimé" 2. run sqlautocode What is the expected output? What do you see instead? $ sqlautocode mysql://[...]/db -d -e -o model...
Open Graph Description: What steps will reproduce the problem? 1. Create a table with an accentuated character in the name, like "pdf_imprimé" 2. run sqlautocode What is the expected output? What do you see instead? $ sql...
X Description: What steps will reproduce the problem? 1. Create a table with an accentuated character in the name, like "pdf_imprimé" 2. run sqlautocode What is the expected output? What do you see inst...
Opengraph URL: https://github.com/unalloc/sqlautocode/issues/37
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MySQL - \"'ascii' codec can't encode character\" with accentuated character in the table name","articleBody":"```\nWhat steps will reproduce the problem?\n1. Create a table with an accentuated character in the name, like \"pdf_imprimé\"\n2. run sqlautocode\n\nWhat is the expected output? What do you see instead?\n$ sqlautocode mysql://[...]/db -d -e -o model.py\nsaac.decl - INFO - Reflecting database...\n[...]\nsaac.decl - DEBUG - Creating Model from table: pdf_imprimé\nTraceback (most recent call last):\n File \"/usr/local/bin/sqlautocode\", line 9, in \u003cmodule\u003e\n load_entry_point('sqlautocode==0.7', 'console_scripts', 'sqlautocode')()\n File \"/usr/local/lib/python2.6/dist-packages/sqlautocode/main.py\", line 21, in main\n emit(repr(factory))\n File \"/usr/local/lib/python2.6/dist-packages/sqlautocode/declarative.py\", line 143, in __repr__\n models = self.models\n File \"/usr/local/lib/python2.6/dist-packages/sqlautocode/declarative.py\", line 192, in models\n self._models.append(self.create_model(table))\n File \"/usr/local/lib/python2.6/dist-packages/sqlautocode/declarative.py\", line 234, in create_model\n class Temporal(self.DeclarativeBase):\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/ext/declarative.py\", line 1336, in __init__\n _as_declarative(cls, classname, cls.__dict__)\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/ext/declarative.py\", line 1329, in _as_declarative\n **mapper_args)\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/__init__.py\", line 1116, in mapper\n return Mapper(class_, local_table, *args, **params)\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/mapper.py\", line 201, in __init__\n self._configure_properties()\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/mapper.py\", line 851, in _configure_properties\n setparent=True)\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/mapper.py\", line 1139, in _configure_property\n prop.instrument_class(self)\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/properties.py\", line 111, in instrument_class\n doc=self.doc\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/attributes.py\", line 1293, in register_descriptor\n manager.instrument_attribute(key, descriptor)\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/instrumentation.py\", line 182, in instrument_attribute\n self.install_descriptor(key, inst)\n File \"/usr/local/lib/python2.6/dist-packages/sqlalchemy/orm/instrumentation.py\", line 236, in install_descriptor\n setattr(self.class_, key, inst)\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\xe9' in position \n20: ordinal not in range(128)\n\n\nWhat version of the product are you using? On what operating system?\nPython 2.6.5 on Linux (I have the same problem with Python 2.7.1 on Windows)\nsqlautocode-0.7\n\nPlease provide any additional information below.\nI also use columns with accentuated characters.\n```\n\nOriginal issue reported on code.google.com by `bigras.b...@gmail.com` on 6 Feb 2012 at 3:07\n","author":{"url":"https://github.com/GoogleCodeExporter","@type":"Person","name":"GoogleCodeExporter"},"datePublished":"2015-12-02T03:31:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/37/sqlautocode/issues/37"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:eff1961c-ca9b-aae8-f7e3-a285f8579351 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9294:DDB35:20A6841:299A877:6991A6DB |
| html-safe-nonce | c7618042090f35c6705dd1c4af0fac222b389a0e522d47885656c18e42a2436f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Mjk0OkREQjM1OjIwQTY4NDE6Mjk5QTg3Nzo2OTkxQTZEQiIsInZpc2l0b3JfaWQiOiI2NzEyMzAzMjg0NDcyODA4NTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 47cfae3fd4d461d6214301207714415e7d98a3325599136405b9c00b89fd36c7 |
| hovercard-subject-tag | issue:119859521 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/unalloc/sqlautocode/37/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dbef44a67aacb83423dd2d85482bce9768bae0365c974b936e905f6b5048fe37/unalloc/sqlautocode/issues/37 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dbef44a67aacb83423dd2d85482bce9768bae0365c974b936e905f6b5048fe37/unalloc/sqlautocode/issues/37 |
| og:image:alt | What steps will reproduce the problem? 1. Create a table with an accentuated character in the name, like "pdf_imprimé" 2. run sqlautocode What is the expected output? What do you see instead? $ sql... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GoogleCodeExporter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/unalloc/sqlautocode git https://github.com/unalloc/sqlautocode.git |
| octolytics-dimension-user_id | 2229516 |
| octolytics-dimension-user_login | unalloc |
| octolytics-dimension-repository_id | 47234827 |
| octolytics-dimension-repository_nwo | unalloc/sqlautocode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 47234827 |
| octolytics-dimension-repository_network_root_nwo | unalloc/sqlautocode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width