René's URL Explorer Experiment


Title: find_path() giving me complex output rather than list of tuples · Issue #56 · brean/python-pathfinding · GitHub

Open Graph Title: find_path() giving me complex output rather than list of tuples · Issue #56 · brean/python-pathfinding

X Title: find_path() giving me complex output rather than list of tuples · Issue #56 · brean/python-pathfinding

Description: Hello, I am trying to use pathfinding but the output I get for the path from the find_path() method is not what I would expect. I would expect a simple list of tuples but instead it is fulled with and I am not...

Open Graph Description: Hello, I am trying to use pathfinding but the output I get for the path from the find_path() method is not what I would expect. I would expect a simple list of tuples but instead it is fulled with ...

X Description: Hello, I am trying to use pathfinding but the output I get for the path from the find_path() method is not what I would expect. I would expect a simple list of tuples but instead it is fulled with ...

Opengraph URL: https://github.com/brean/python-pathfinding/issues/56

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"find_path() giving me complex output rather than list of tuples","articleBody":"Hello, I am trying to use pathfinding but the output I get for the path from the `find_path()` method is not what I would expect. I would expect a simple list of tuples but instead it is fulled with `\u003cGridNode(0:0 0x104760110)\u003e` and I am not sure what is wrong with my setup. \r\n\r\nMy system is: MacOS Sonoma 14.2.1 (M1 Pro chip) and I am running Python 3.12.1 and pathfinding 1.0.9. \r\n\r\nThe code that I am using as a test is below: \r\n\r\n```\r\nfrom pathfinding.core.diagonal_movement import DiagonalMovement\r\nfrom pathfinding.core.grid import Grid\r\nfrom pathfinding.finder.a_star import AStarFinder\r\nimport random\r\n\r\nblockpositions = []\r\n\r\ndef makegrid(x2, y2):\r\n\tgrid = []\r\n\tfor x in range(x2):\r\n\t\tgrid.append([])\r\n\t\tfor y in range(y2):\r\n\t\t\tif random.randint(1,5)==1:\r\n\t\t\t\tblockpositions.append((x, y))\r\n\t\t\t\tgrid[x].append(0)\r\n\t\t\telse:\r\n\t\t\t\tgrid[x].append(1)\r\n\treturn grid\r\n\r\ngrid = makegrid(50, 50)\r\nstartpos = (0, 0)\r\nendpos = (49, 49)\r\n\r\nfinder = AStarFinder(diagonal_movement=DiagonalMovement.always)\r\ngrid2 = Grid(matrix = grid)\r\n\r\nstart = grid2.node(startpos[0], startpos[1])\r\nend = grid2.node(endpos[0], endpos[1])\r\n\r\npath, runs = finder.find_path(start, end, grid2)\r\nfor x in path:\r\n\tif x in blockpositions:\r\n\t\tprint(\"block in path!\")\r\nprint(path)\r\n```\r\n\r\nThe output is:\r\n`[\u003cGridNode(0:0 0x104760110)\u003e, \u003cGridNode(1:1 0x104b46c90)\u003e, \u003cGridNode(2:1 0x104b46cc0)\u003e, \u003cGridNode(3:2 0x104b47650)\u003e, \u003cGridNode(3:3 0x104b47fb0)\u003e, \u003cGridNode(4:4 0x104b74980)\u003e, \u003cGridNode(5:5 0x104b75310)\u003e, \u003cGridNode(6:6 0x104b75ca0)\u003e, \u003cGridNode(7:7 0x104b76630)\u003e, \u003cGridNode(8:8 0x104b76fc0)\u003e, \u003cGridNode(9:9 0x104b77950)\u003e, \u003cGridNode(10:10 0x104b84320)\u003e, \u003cGridNode(11:10 0x104b84350)\u003e, \u003cGridNode(12:11 0x104b84ce0)\u003e, \u003cGridNode(13:12 0x104b85670)\u003e, \u003cGridNode(14:13 0x104b86000)\u003e, \u003cGridNode(15:14 0x104b86990)\u003e, \u003cGridNode(16:15 0x104b87320)\u003e, \u003cGridNode(17:16 0x104b87cb0)\u003e, \u003cGridNode(18:17 0x104b98680)\u003e, \u003cGridNode(19:18 0x104b99010)\u003e, \u003cGridNode(20:19 0x104b999a0)\u003e, \u003cGridNode(21:20 0x104b9a330)\u003e, \u003cGridNode(22:21 0x104b9acc0)\u003e, \u003cGridNode(23:22 0x104b9b650)\u003e, \u003cGridNode(24:23 0x104b9bfe0)\u003e, \u003cGridNode(25:24 0x104ba89b0)\u003e, \u003cGridNode(26:25 0x104ba9340)\u003e, \u003cGridNode(26:26 0x104ba9ca0)\u003e, \u003cGridNode(27:27 0x104baa630)\u003e, \u003cGridNode(28:28 0x104baafc0)\u003e, \u003cGridNode(29:29 0x104bab950)\u003e, \u003cGridNode(30:30 0x104bb8320)\u003e, \u003cGridNode(30:31 0x104bb8c80)\u003e, \u003cGridNode(31:32 0x104bb9610)\u003e, \u003cGridNode(32:33 0x104bb9fa0)\u003e, \u003cGridNode(33:34 0x104bba930)\u003e, \u003cGridNode(34:34 0x104bba960)\u003e, \u003cGridNode(35:35 0x104bbb2f0)\u003e, \u003cGridNode(36:36 0x104bbbc80)\u003e, \u003cGridNode(37:37 0x104bc8650)\u003e, \u003cGridNode(38:37 0x104bc8680)\u003e, \u003cGridNode(39:38 0x104bc9010)\u003e, \u003cGridNode(40:39 0x104bc99a0)\u003e, \u003cGridNode(41:40 0x104bca330)\u003e, \u003cGridNode(42:41 0x104bcacc0)\u003e, \u003cGridNode(43:41 0x104bcacf0)\u003e, \u003cGridNode(44:42 0x104bcb680)\u003e, \u003cGridNode(45:43 0x104bd8050)\u003e, \u003cGridNode(46:44 0x104bd89e0)\u003e, \u003cGridNode(47:45 0x104bd9370)\u003e, \u003cGridNode(48:46 0x104bd9d00)\u003e, \u003cGridNode(49:47 0x104bda690)\u003e, \u003cGridNode(49:48 0x104bdaff0)\u003e, \u003cGridNode(49:49 0x104bdb950)\u003e]`\r\n\r\nPlease let me figure out what is going wrong. ","author":{"url":"https://github.com/jamespblloyd-uwa","@type":"Person","name":"jamespblloyd-uwa"},"datePublished":"2024-01-20T13:57:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/56/python-pathfinding/issues/56"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:95116381-e502-44f1-5ac9-af9569c28595
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC39C:282B52:39600:48129:698D2441
html-safe-nonce7cb59c1a5fe163499468a531d1aed2bfef8c34884c68dd4b65582e40b34af26b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzlDOjI4MkI1MjozOTYwMDo0ODEyOTo2OThEMjQ0MSIsInZpc2l0b3JfaWQiOiIzOTc5NjYxNjEwOTkzOTE5MDQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd0f629904c31a8d74b1f199cbb5fbfb44ba7500663bf59a249bac2cf7b780a5b
hovercard-subject-tagissue:2092063005
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/brean/python-pathfinding/56/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5efe275133dc5d2f73b9cefe44716a0b15c1551017c276b3fca380d93fd6fea5/brean/python-pathfinding/issues/56
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5efe275133dc5d2f73b9cefe44716a0b15c1551017c276b3fca380d93fd6fea5/brean/python-pathfinding/issues/56
og:image:altHello, I am trying to use pathfinding but the output I get for the path from the find_path() method is not what I would expect. I would expect a simple list of tuples but instead it is fulled with ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejamespblloyd-uwa
hostnamegithub.com
expected-hostnamegithub.com
Nonec25395580e1e3bf82d705e0982a1b24255366088720fef945f1493d5e3e67954
turbo-cache-controlno-preview
go-importgithub.com/brean/python-pathfinding git https://github.com/brean/python-pathfinding.git
octolytics-dimension-user_id229768
octolytics-dimension-user_loginbrean
octolytics-dimension-repository_id32716626
octolytics-dimension-repository_nwobrean/python-pathfinding
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id32716626
octolytics-dimension-repository_network_root_nwobrean/python-pathfinding
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
release1fa2bc33fc715bfb2cb9dd8a9cad4f811c16c371
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/brean/python-pathfinding/issues/56#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrean%2Fpython-pathfinding%2Fissues%2F56
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrean%2Fpython-pathfinding%2Fissues%2F56
Sign up https://patch-diff.githubusercontent.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=brean%2Fpython-pathfinding
Reloadhttps://patch-diff.githubusercontent.com/brean/python-pathfinding/issues/56
Reloadhttps://patch-diff.githubusercontent.com/brean/python-pathfinding/issues/56
Reloadhttps://patch-diff.githubusercontent.com/brean/python-pathfinding/issues/56
brean https://patch-diff.githubusercontent.com/brean
python-pathfindinghttps://patch-diff.githubusercontent.com/brean/python-pathfinding
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fbrean%2Fpython-pathfinding
Fork 73 https://patch-diff.githubusercontent.com/login?return_to=%2Fbrean%2Fpython-pathfinding
Star 370 https://patch-diff.githubusercontent.com/login?return_to=%2Fbrean%2Fpython-pathfinding
Code https://patch-diff.githubusercontent.com/brean/python-pathfinding
Issues 24 https://patch-diff.githubusercontent.com/brean/python-pathfinding/issues
Pull requests 0 https://patch-diff.githubusercontent.com/brean/python-pathfinding/pulls
Actions https://patch-diff.githubusercontent.com/brean/python-pathfinding/actions
Projects 2 https://patch-diff.githubusercontent.com/brean/python-pathfinding/projects
Wiki https://patch-diff.githubusercontent.com/brean/python-pathfinding/wiki
Security 0 https://patch-diff.githubusercontent.com/brean/python-pathfinding/security
Insights https://patch-diff.githubusercontent.com/brean/python-pathfinding/pulse
Code https://patch-diff.githubusercontent.com/brean/python-pathfinding
Issues https://patch-diff.githubusercontent.com/brean/python-pathfinding/issues
Pull requests https://patch-diff.githubusercontent.com/brean/python-pathfinding/pulls
Actions https://patch-diff.githubusercontent.com/brean/python-pathfinding/actions
Projects https://patch-diff.githubusercontent.com/brean/python-pathfinding/projects
Wiki https://patch-diff.githubusercontent.com/brean/python-pathfinding/wiki
Security https://patch-diff.githubusercontent.com/brean/python-pathfinding/security
Insights https://patch-diff.githubusercontent.com/brean/python-pathfinding/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/brean/python-pathfinding/issues/56
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/brean/python-pathfinding/issues/56
find_path() giving me complex output rather than list of tupleshttps://patch-diff.githubusercontent.com/brean/python-pathfinding/issues/56#top
1.1https://github.com/brean/python-pathfinding/milestone/1
https://github.com/jamespblloyd-uwa
https://github.com/jamespblloyd-uwa
jamespblloyd-uwahttps://github.com/jamespblloyd-uwa
on Jan 20, 2024https://github.com/brean/python-pathfinding/issues/56#issue-2092063005
Release 1.1https://github.com/users/brean/projects/1
1.1No due datehttps://github.com/brean/python-pathfinding/milestone/1
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.