René's URL Explorer Experiment


Title: type error when using maxcolwidths with colored strings · Issue #359 · astanin/python-tabulate · GitHub

Open Graph Title: type error when using maxcolwidths with colored strings · Issue #359 · astanin/python-tabulate

X Title: type error when using maxcolwidths with colored strings · Issue #359 · astanin/python-tabulate

Description: Issue: colored string type throwing an error in casted_cell assignment because _type method not equipped to handle it. Can we either: add a type check to see if cell is already a str before putting it through 'casted_cell'? This could av...

Open Graph Description: Issue: colored string type throwing an error in casted_cell assignment because _type method not equipped to handle it. Can we either: add a type check to see if cell is already a str before putting...

X Description: Issue: colored string type throwing an error in casted_cell assignment because _type method not equipped to handle it. Can we either: add a type check to see if cell is already a str before putting...

Opengraph URL: https://github.com/astanin/python-tabulate/issues/359

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"type error when using maxcolwidths with colored strings","articleBody":"Issue: colored string type throwing an error in casted_cell assignment because _type method not equipped to handle it. \nCan we either: \n\n- add a type check to see if cell is already a str before putting it through 'casted_cell'? This could avoid the need for edge case checks but I may be misunderstanding why this method was necessary to begin with. \n- add colored string type to _type method. From the method details it seems that it should be equipped to handle input '\\x1b[43m\\x1b[30m3\\x1b[0m' but it throws an error\n\n```\ninput value for 'cell': \"3\" (colored string)\nError: \n  File \"/data/sandcastle/boxes/fbsource/buck-out/v2/gen/fbcode/e104f4d0e1969b09/pytorchrelengoncall/__syncdiag__/syncdiag#link-tree/tabulate/__init__.py\", line 1516, in _wrap_text_to_colwidths\n    str(cell) if _isnumber(cell) else _type(cell, numparse)(cell)\nValueError: invalid literal for int() with base 10: '\\x1b[43m\\x1b[30m3\\x1b[0m'\n```","author":{"url":"https://github.com/Camyll","@type":"Person","name":"Camyll"},"datePublished":"2025-02-12T23:09:30Z","url":"https://github.com/astanin/python-tabulate/issues/359"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9c26257d-97c5-ce3b-9e47-516587f2a0cf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id98EA:3A2D2D:7E1100:AC66A2:6AFF382A
html-safe-noncec050d5512b8562552ced9bdbad6c658ded11dae2eb8c332c6716946dcb158d3c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEVBOjNBMkQyRDo3RTExMDA6QUM2NkEyOjZBRkYzODJBIiwidmlzaXRvcl9pZCI6IjQ1MjQyMDA0Mzk4MDA4NzA5NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac357fa77169934148c75a1c7892d2bc433946ee170a7371c5f9f55e40e53248e9
hovercard-subject-tagissue:2849543918
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/astanin/python-tabulate/359/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bcb990f7cbfe13e8d0e8846b2db900c3a6102232a09061f36a4f4d610740fb16/astanin/python-tabulate/issues/359
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bcb990f7cbfe13e8d0e8846b2db900c3a6102232a09061f36a4f4d610740fb16/astanin/python-tabulate/issues/359
og:image:altIssue: colored string type throwing an error in casted_cell assignment because _type method not equipped to handle it. Can we either: add a type check to see if cell is already a str before putting...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameCamyll
hostnamegithub.com
expected-hostnamegithub.com
Nonec62a4cffe270f7bba529ed9ad80c801130bd3c78e2633b6731e04c3d4c94463b
turbo-cache-controlno-preview
go-importgithub.com/astanin/python-tabulate git https://github.com/astanin/python-tabulate.git
octolytics-dimension-user_id71802
octolytics-dimension-user_loginastanin
octolytics-dimension-repository_id205875548
octolytics-dimension-repository_nwoastanin/python-tabulate
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id205875548
octolytics-dimension-repository_network_root_nwoastanin/python-tabulate
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
release1a7765b21f802bf37d4363105328933cfb777dff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/astanin/python-tabulate/issues/359#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fastanin%2Fpython-tabulate%2Fissues%2F359
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fastanin%2Fpython-tabulate%2Fissues%2F359
Sign uphttps://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=astanin%2Fpython-tabulate
Reloadhttps://github.com/astanin/python-tabulate/issues/359
Reloadhttps://github.com/astanin/python-tabulate/issues/359
Reloadhttps://github.com/astanin/python-tabulate/issues/359
astaninhttps://github.com/astanin
python-tabulatehttps://github.com/astanin/python-tabulate
Codehttps://github.com/astanin/python-tabulate
Issues75 (75)https://github.com/astanin/python-tabulate/issues
Pull requests63 (63)https://github.com/astanin/python-tabulate/pulls
Actionshttps://github.com/astanin/python-tabulate/actions
Security and qualityhttps://github.com/astanin/python-tabulate/security
Insightshttps://github.com/astanin/python-tabulate/pulse
https://github.com/astanin/python-tabulate
New issuehttps://github.com/login?return_to=https://github.com/astanin/python-tabulate/issues/359
New issuehttps://github.com/login?return_to=https://github.com/astanin/python-tabulate/issues/359
#506https://github.com/astanin/python-tabulate/pull/506
type error when using maxcolwidths with colored stringshttps://github.com/astanin/python-tabulate/issues/359#top
#506https://github.com/astanin/python-tabulate/pull/506
questionFurther information is requestedhttps://github.com/astanin/python-tabulate/issues?q=state%3Aopen%20label%3A%22question%22
https://github.com/Camyll
Camyllhttps://github.com/Camyll
on Feb 12, 2025https://github.com/astanin/python-tabulate/issues/359#issue-2849543918
https://github.com/astanin
astaninhttps://github.com/astanin
on Mar 5, 2026https://github.com/astanin/python-tabulate/issues/359#issuecomment-4004030961
astaninhttps://github.com/astanin
questionFurther information is requestedhttps://github.com/astanin/python-tabulate/issues?q=state%3Aopen%20label%3A%22question%22
on Mar 5, 2026https://github.com/astanin/python-tabulate/issues/359#event-23292374636
Sign up for freehttps://github.com/signup?return_to=https://github.com/astanin/python-tabulate/issues/359
Sign in to commenthttps://github.com/login?return_to=https://github.com/astanin/python-tabulate/issues/359
questionFurther information is requestedhttps://github.com/astanin/python-tabulate/issues?q=state%3Aopen%20label%3A%22question%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.