René's URL Explorer Experiment


Title: Error in Downloading converted mp3 file. Everything else works fine. · Issue #39 · kantancoding/microservices-python · GitHub

Open Graph Title: Error in Downloading converted mp3 file. Everything else works fine. · Issue #39 · kantancoding/microservices-python

X Title: Error in Downloading converted mp3 file. Everything else works fine. · Issue #39 · kantancoding/microservices-python

Description: Hi @kantancoding , I followed your Youtube tutorial. I experienced some errors during implementation in my local system. I tried in both Windows and Ubuntu. I got more parts working in Windows. In Ubuntu, I can move forward through MySQL...

Open Graph Description: Hi @kantancoding , I followed your Youtube tutorial. I experienced some errors during implementation in my local system. I tried in both Windows and Ubuntu. I got more parts working in Windows. In ...

X Description: Hi @kantancoding , I followed your Youtube tutorial. I experienced some errors during implementation in my local system. I tried in both Windows and Ubuntu. I got more parts working in Windows. In ...

Opengraph URL: https://github.com/kantancoding/microservices-python/issues/39

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error in Downloading converted mp3 file. Everything else works fine.","articleBody":"Hi @kantancoding ,\r\nI followed your Youtube tutorial. I experienced some errors during implementation in my local system. I tried in both Windows and Ubuntu. I got more parts working in Windows. In Ubuntu, I can move forward through MySQL Error. \r\n\r\nNow my problem is I am not able to download the converted mp3 file. Everything else works fine. The upload part works fine. The Rabbit MQ console page shows the message flow correctly in overview page. But when I try to download the converted file, I got error in gateway pod. The error is:\r\n\r\n```\r\nTraceback (most recent call last):                                                                                                 \r\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 1473, in wsgi_app                                                \r\n\tresponse = self.full_dispatch_request()                                                                                        \r\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 883, in full_dispatch_request                                    \r\n\treturn self.finalize_request(rv)                                                                                               \r\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 902, in finalize_request                                         \r\n\tresponse = self.make_response(rv)                                                                                              \r\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 1174, in make_response                                           \r\n\traise TypeError(                                                                                                             \r\nTypeError: The view function for 'download' did not return a valid response. The function either returned None or ended without  \r\n10.244.0.35 - - [13/Oct/2024 17:26:52] \"GET /download?fid=670c012c7b8bed687d11e620 HTTP/1.1\" 500 -\r\n```\r\n\r\nThe gateway/server.py file is:\r\n\r\n```\r\nimport os, gridfs, pika, json\r\nfrom flask import Flask, request, send_file\r\nfrom flask_pymongo import PyMongo\r\nfrom auth import validate\r\nfrom auth_svc import access\r\nfrom storage import util\r\nfrom bson.objectid import ObjectId\r\n\r\nserver = Flask(__name__)\r\n\r\nmongo_video = PyMongo(server, uri=\"mongodb://host.minikube.internal:27017/videos\")\r\n\r\nmongo_mp3 = PyMongo(server, uri=\"mongodb://host.minikube.internal:27017/mp3s\")\r\n\r\nfs_videos = gridfs.GridFS(mongo_video.db)\r\nfs_mp3s = gridfs.GridFS(mongo_mp3.db)\r\n\r\nconnection = pika.BlockingConnection(pika.ConnectionParameters(\"rabbitmq\"))\r\nchannel = connection.channel()\r\n\r\n\r\n@server.route(\"/login\", methods=[\"POST\"])\r\ndef login():\r\n    token, err = access.login(request)\r\n\r\n    if not err:\r\n        return token\r\n    else:\r\n        return err\r\n\r\n\r\n@server.route(\"/upload\", methods=[\"POST\"])\r\ndef upload():\r\n    access, err = validate.token(request)\r\n\r\n    if err:\r\n        return err\r\n\r\n    access = json.loads(access)\r\n\r\n    if access[\"admin\"]:\r\n        if len(request.files) \u003e 1 or len(request.files) \u003c 1:\r\n            return \"exactly 1 file required\", 400\r\n\r\n        for _, f in request.files.items():\r\n            err = util.upload(f, fs_videos, channel, access)\r\n\r\n            if err:\r\n                return err\r\n\r\n        return \"success!\", 200\r\n    else:\r\n        return \"not authorized\", 401\r\n\r\n\r\n@server.route(\"/download\", methods=[\"GET\"])\r\ndef download():\r\n    access, err = validate.token(request)\r\n\r\n    if err:\r\n        return err\r\n\r\n    access = json.loads(access)\r\n\r\n    if access[\"admin\"]:\r\n        fid_string = request.args.get(\"fid\")\r\n\r\n        if not fid_string:\r\n            return \"fid is required\", 400\r\n\r\n        try:\r\n            out = fs_mp3s.get(ObjectId(fid_string))\r\n            return send_file(out, download_name=f\"{fid_string}.mp3\")\r\n        except Exception as err:\r\n            print(err)\r\n            return \"internal server error\", 500\r\n\r\n    return \"not authorized\", 401\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    server.run(host=\"0.0.0.0\", port=8080)\r\n```\r\n\r\nWhat will be the problem ? Can you please explain this and help me to solve the problem?","author":{"url":"https://github.com/vigneshs-dev","@type":"Person","name":"vigneshs-dev"},"datePublished":"2024-10-13T17:38:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/39/microservices-python/issues/39"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b6964826-8343-56b2-db3c-0f30646117de
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9242:2A0D6:E396C7:12F66D7:697321FC
html-safe-noncec53affdc7231f5b9aabddd3111fe66e3dea3e1be8fb688a272830429cacd01aa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjQyOjJBMEQ2OkUzOTZDNzoxMkY2NkQ3OjY5NzMyMUZDIiwidmlzaXRvcl9pZCI6IjE1MTg1NDA5NTI2MTQxNTA2NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacde1deb5df047906290de43ea14871a152580cf28764ba8d35a1dc46217200db0
hovercard-subject-tagissue:2584136322
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/kantancoding/microservices-python/39/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7cfded42e5ff1c3c4e4ed5c87b61f71a8bd96b86d2aa82094364a4da92b00e21/kantancoding/microservices-python/issues/39
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7cfded42e5ff1c3c4e4ed5c87b61f71a8bd96b86d2aa82094364a4da92b00e21/kantancoding/microservices-python/issues/39
og:image:altHi @kantancoding , I followed your Youtube tutorial. I experienced some errors during implementation in my local system. I tried in both Windows and Ubuntu. I got more parts working in Windows. In ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevigneshs-dev
hostnamegithub.com
expected-hostnamegithub.com
None44ab3188c1dcfe3be0f9c3feca2e04e14fb79f120939ce2395e4f15ab96ec1d4
turbo-cache-controlno-preview
go-importgithub.com/kantancoding/microservices-python git https://github.com/kantancoding/microservices-python.git
octolytics-dimension-user_id78267301
octolytics-dimension-user_loginkantancoding
octolytics-dimension-repository_id563677660
octolytics-dimension-repository_nwokantancoding/microservices-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id563677660
octolytics-dimension-repository_network_root_nwokantancoding/microservices-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
releasea5e2b48bd1260476599758f5d253b5d24092ab84
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/kantancoding/microservices-python/issues/39#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fkantancoding%2Fmicroservices-python%2Fissues%2F39
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%2Fkantancoding%2Fmicroservices-python%2Fissues%2F39
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=kantancoding%2Fmicroservices-python
Reloadhttps://patch-diff.githubusercontent.com/kantancoding/microservices-python/issues/39
Reloadhttps://patch-diff.githubusercontent.com/kantancoding/microservices-python/issues/39
Reloadhttps://patch-diff.githubusercontent.com/kantancoding/microservices-python/issues/39
kantancoding https://patch-diff.githubusercontent.com/kantancoding
microservices-pythonhttps://patch-diff.githubusercontent.com/kantancoding/microservices-python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fkantancoding%2Fmicroservices-python
Fork 190 https://patch-diff.githubusercontent.com/login?return_to=%2Fkantancoding%2Fmicroservices-python
Star 318 https://patch-diff.githubusercontent.com/login?return_to=%2Fkantancoding%2Fmicroservices-python
Code https://patch-diff.githubusercontent.com/kantancoding/microservices-python
Issues 6 https://patch-diff.githubusercontent.com/kantancoding/microservices-python/issues
Pull requests 2 https://patch-diff.githubusercontent.com/kantancoding/microservices-python/pulls
Actions https://patch-diff.githubusercontent.com/kantancoding/microservices-python/actions
Projects 0 https://patch-diff.githubusercontent.com/kantancoding/microservices-python/projects
Security 0 https://patch-diff.githubusercontent.com/kantancoding/microservices-python/security
Insights https://patch-diff.githubusercontent.com/kantancoding/microservices-python/pulse
Code https://patch-diff.githubusercontent.com/kantancoding/microservices-python
Issues https://patch-diff.githubusercontent.com/kantancoding/microservices-python/issues
Pull requests https://patch-diff.githubusercontent.com/kantancoding/microservices-python/pulls
Actions https://patch-diff.githubusercontent.com/kantancoding/microservices-python/actions
Projects https://patch-diff.githubusercontent.com/kantancoding/microservices-python/projects
Security https://patch-diff.githubusercontent.com/kantancoding/microservices-python/security
Insights https://patch-diff.githubusercontent.com/kantancoding/microservices-python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/kantancoding/microservices-python/issues/39
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/kantancoding/microservices-python/issues/39
Error in Downloading converted mp3 file. Everything else works fine.https://patch-diff.githubusercontent.com/kantancoding/microservices-python/issues/39#top
https://github.com/vigneshs-dev
https://github.com/vigneshs-dev
vigneshs-devhttps://github.com/vigneshs-dev
on Oct 13, 2024https://github.com/kantancoding/microservices-python/issues/39#issue-2584136322
@kantancodinghttps://github.com/kantancoding
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.