1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
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!
beantwortet vor 10 Monaten
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr
the full stacktrace should have more indications of the cause, that error is too generic.