1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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!
respondido hace 10 meses
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 7 meses
- OFICIAL DE AWSActualizada hace 2 años
the full stacktrace should have more indications of the cause, that error is too generic.