1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Krishna,
I think the issue is coming from the MongoDB URI in the script. You are trying to use a variable 'collection' in the URI string, but it's not being interpolated correctly. Here's the problematic line:
mongo_uri = "mongodb://<username>:<password>@<hostname>:27017/<databasename>.'collection'"
The 'collection' variable is inside single quotes, which means it's being treated as a literal string, not a variable. To interpolate the variable into the string, you should use f-string formatting in Python. Here's how to fix it:
mongo_uri = f"mongodb://<username>:<password>@<hostname>:27017/<databasename>.{args['collection']}"
This will replace {args['collection']}
with the value of the 'collection' argument passed to the script.
Hope this helps with the issue!
répondu il y a 10 mois
Contenus pertinents
- demandé il y a 7 mois
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
the full stacktrace should have more indications of the cause, that error is too generic.