René's URL Explorer Experiment


Title: Improve error message for missing @schema decorator · Issue #466 · datajoint/datajoint-python · GitHub

Open Graph Title: Improve error message for missing @schema decorator · Issue #466 · datajoint/datajoint-python

X Title: Improve error message for missing @schema decorator · Issue #466 · datajoint/datajoint-python

Description: If you forget to decorate a datajoint class with its schema, the error message is now more cryptic than it used to be. class Mouse(dj.Manual): definition = """ mouse_id : int ---- dob : date sex : enum('M', 'F', 'unknown') """ pass Mouse...

Open Graph Description: If you forget to decorate a datajoint class with its schema, the error message is now more cryptic than it used to be. class Mouse(dj.Manual): definition = """ mouse_id : int ---- dob : date sex : ...

X Description: If you forget to decorate a datajoint class with its schema, the error message is now more cryptic than it used to be. class Mouse(dj.Manual): definition = """ mouse_id : int ---- do...

Opengraph URL: https://github.com/datajoint/datajoint-python/issues/466

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve error message for missing @schema decorator","articleBody":"If you forget to decorate a datajoint class with its schema, the error message is now more cryptic than it used to be.\r\n\r\n```python\r\nclass Mouse(dj.Manual):\r\n    definition = \"\"\"\r\n    mouse_id : int  \r\n    ----\r\n    dob  : date \r\n    sex  : enum('M', 'F', 'unknown')\r\n    \"\"\"\r\n    pass\r\n\r\nMouse()\r\n```\r\n```\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n/opt/conda/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)\r\n    700                 type_pprinters=self.type_printers,\r\n    701                 deferred_pprinters=self.deferred_printers)\r\n--\u003e 702             printer.pretty(obj)\r\n    703             printer.flush()\r\n    704             return stream.getvalue()\r\n\r\n/opt/conda/lib/python3.6/site-packages/IPython/lib/pretty.py in pretty(self, obj)\r\n    393                             if callable(meth):\r\n    394                                 return meth(obj, self, cycle)\r\n--\u003e 395             return _default_pprint(obj, self, cycle)\r\n    396         finally:\r\n    397             self.end_group()\r\n\r\n/opt/conda/lib/python3.6/site-packages/IPython/lib/pretty.py in _default_pprint(obj, p, cycle)\r\n    508     if _safe_getattr(klass, '__repr__', None) is not object.__repr__:\r\n    509         # A user-provided repr. Find newlines and replace them with p.break_()\r\n--\u003e 510         _repr_pprint(obj, p, cycle)\r\n    511         return\r\n    512     p.begin_group(1, '\u003c')\r\n\r\n/opt/conda/lib/python3.6/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)\r\n    699     \"\"\"A pprint that just redirects to the normal repr function.\"\"\"\r\n    700     # Find newlines and replace them with p.break_()\r\n--\u003e 701     output = repr(obj)\r\n    702     for idx,output_line in enumerate(output.splitlines()):\r\n    703         if idx:\r\n\r\n/opt/conda/lib/python3.6/site-packages/datajoint/relational_operand.py in __repr__(self)\r\n    345 \r\n    346     def __repr__(self):\r\n--\u003e 347         return super().__repr__() if config['loglevel'].lower() == 'debug' else self.preview()\r\n    348 \r\n    349     def preview(self, limit=None, width=None):\r\n\r\n/opt/conda/lib/python3.6/site-packages/datajoint/relational_operand.py in preview(self, limit, width)\r\n    351         returns a preview of the contents of the relation.\r\n    352         \"\"\"\r\n--\u003e 353         heading = self.heading\r\n    354         rel = self.proj(*heading.non_blobs)\r\n    355         if limit is None:\r\n\r\n/opt/conda/lib/python3.6/site-packages/datajoint/base_relation.py in heading(self)\r\n     43             self._heading = Heading()  # instance-level heading\r\n     44         if not self._heading:  # lazy loading of heading\r\n---\u003e 45             self._heading.init_from_database(self.connection, self.database, self.table_name)\r\n     46         return self._heading\r\n     47 \r\n\r\n/opt/conda/lib/python3.6/site-packages/datajoint/heading.py in init_from_database(self, conn, database, table_name)\r\n    132         initialize heading from a database table.  The table must exist already.\r\n    133         \"\"\"\r\n--\u003e 134         info = conn.query('SHOW TABLE STATUS FROM `{database}` WHERE name=\"{table_name}\"'.format(\r\n    135             table_name=table_name, database=database), as_dict=True).fetchone()\r\n    136         if info is None:\r\n\r\nAttributeError: 'NoneType' object has no attribute 'query'\r\n\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n/opt/conda/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)\r\n    343             method = get_real_method(obj, self.print_method)\r\n    344             if method is not None:\r\n--\u003e 345                 return method()\r\n    346             return None\r\n    347         else:\r\n\r\n/opt/conda/lib/python3.6/site-packages/datajoint/relational_operand.py in _repr_html_(self)\r\n    373 \r\n    374     def _repr_html_(self):\r\n--\u003e 375         heading = self.heading\r\n    376         rel = self.proj(*heading.non_blobs)\r\n    377         info = heading.table_info\r\n\r\n/opt/conda/lib/python3.6/site-packages/datajoint/base_relation.py in heading(self)\r\n     43             self._heading = Heading()  # instance-level heading\r\n     44         if not self._heading:  # lazy loading of heading\r\n---\u003e 45             self._heading.init_from_database(self.connection, self.database, self.table_name)\r\n     46         return self._heading\r\n     47 \r\n\r\n/opt/conda/lib/python3.6/site-packages/datajoint/heading.py in init_from_database(self, conn, database, table_name)\r\n    132         initialize heading from a database table.  The table must exist already.\r\n    133         \"\"\"\r\n--\u003e 134         info = conn.query('SHOW TABLE STATUS FROM `{database}` WHERE name=\"{table_name}\"'.format(\r\n    135             table_name=table_name, database=database), as_dict=True).fetchone()\r\n    136         if info is None:\r\n\r\nAttributeError: 'NoneType' object has no attribute 'query'\r\n```","author":{"url":"https://github.com/dimitri-yatsenko","@type":"Person","name":"dimitri-yatsenko"},"datePublished":"2018-04-19T17:48:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/466/datajoint-python/issues/466"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bfad03f9-fbe1-9bcf-864f-f10b0d3da1f2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB7B6:14011B:15CD6C6:1DA7E04:6A4F0250
html-safe-nonce3764466488ed3660896698590dcfc03f0328f942d3b2f81a2ef6294b1dc4d412
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0I2OjE0MDExQjoxNUNENkM2OjFEQTdFMDQ6NkE0RjAyNTAiLCJ2aXNpdG9yX2lkIjoiNTIxMzM4NzMxMTc2NTQ1NTQ0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc1b20b5bc6f5f415d524c44803b1cb0326ecc6ef5b32b53a011d3c3dac67ebe8
hovercard-subject-tagissue:315976842
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/datajoint/datajoint-python/466/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6a92489c03baf31abdcc254806c6d807b0e26131fdbc19a101a700b5d3914a48/datajoint/datajoint-python/issues/466
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6a92489c03baf31abdcc254806c6d807b0e26131fdbc19a101a700b5d3914a48/datajoint/datajoint-python/issues/466
og:image:altIf you forget to decorate a datajoint class with its schema, the error message is now more cryptic than it used to be. class Mouse(dj.Manual): definition = """ mouse_id : int ---- dob : date sex : ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedimitri-yatsenko
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
go-importgithub.com/datajoint/datajoint-python git https://github.com/datajoint/datajoint-python.git
octolytics-dimension-user_id2375501
octolytics-dimension-user_logindatajoint
octolytics-dimension-repository_id5866704
octolytics-dimension-repository_nwodatajoint/datajoint-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id5866704
octolytics-dimension-repository_network_root_nwodatajoint/datajoint-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b8f23afb982271f1b22258a94aede67a6b77760
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/datajoint/datajoint-python/issues/466#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatajoint%2Fdatajoint-python%2Fissues%2F466
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatajoint%2Fdatajoint-python%2Fissues%2F466
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=datajoint%2Fdatajoint-python
Reloadhttps://github.com/datajoint/datajoint-python/issues/466
Reloadhttps://github.com/datajoint/datajoint-python/issues/466
Reloadhttps://github.com/datajoint/datajoint-python/issues/466
Please reload this pagehttps://github.com/datajoint/datajoint-python/issues/466
datajoint https://github.com/datajoint
datajoint-pythonhttps://github.com/datajoint/datajoint-python
Notifications https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Fork 96 https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Star 194 https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Code https://github.com/datajoint/datajoint-python
Issues 8 https://github.com/datajoint/datajoint-python/issues
Pull requests 4 https://github.com/datajoint/datajoint-python/pulls
Discussions https://github.com/datajoint/datajoint-python/discussions
Actions https://github.com/datajoint/datajoint-python/actions
Security and quality 0 https://github.com/datajoint/datajoint-python/security
Insights https://github.com/datajoint/datajoint-python/pulse
Code https://github.com/datajoint/datajoint-python
Issues https://github.com/datajoint/datajoint-python/issues
Pull requests https://github.com/datajoint/datajoint-python/pulls
Discussions https://github.com/datajoint/datajoint-python/discussions
Actions https://github.com/datajoint/datajoint-python/actions
Security and quality https://github.com/datajoint/datajoint-python/security
Insights https://github.com/datajoint/datajoint-python/pulse
#456https://github.com/datajoint/datajoint-python/pull/456
Improve error message for missing @schema decoratorhttps://github.com/datajoint/datajoint-python/issues/466#top
#456https://github.com/datajoint/datajoint-python/pull/456
https://github.com/dimitri-yatsenko
enhancementIndicates new improvementshttps://github.com/datajoint/datajoint-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/dimitri-yatsenko
dimitri-yatsenkohttps://github.com/dimitri-yatsenko
on Apr 19, 2018https://github.com/datajoint/datajoint-python/issues/466#issue-315976842
dimitri-yatsenkohttps://github.com/dimitri-yatsenko
enhancementIndicates new improvementshttps://github.com/datajoint/datajoint-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.