Hi, I am having an issue with this ticket User Management. I believe the code is correct in the functions get_user, add_user, login_user, etc. I passed for all the unit tests, however I am getting an error when I run the check in the status page for the validation code. I am getting the error User management: invalid response to register. Can anyone point me to the right direction? Could it be a package issue? I can share my code, and anything else needed.
Thanks for raising this issue with the validation code generation for this lesson.
In order to get a better understanding of what exactly the error is, can you please attach the output from run.py so we can see exactly what error is being logged. This will help understand what the potential cause might be.
Once you add the output from
run.py we can review it to help determine what the cause for the error might be.
Hi Eoin, thank you for responding. I have attached the output. I am able to launch the app with run.py. I can reach the status page to do the status checks, however it fails when I do the user management check. The error states invalid response to register.
When I run the tests with pytest -m user_management, it passes all the checks. I also checked my code with a jupyter notebook, so I believe my code for all 6 functions are correct. I have double checked to make sure the packages are correct. I think the issue might be with the set up of my .ini file, but I am unsure,. Is there any way to double check that file with you?
That .ini file on initial review looks fine. Can you attach the output from the console for run.py when you click the validation? 10 or so lines before to about 40 or so after should cover sufficient detail to understand what exactly is happening. I can’t begin to make a hypothesis without that data as it’s not clear as what exactly happening.
Thanks and kindest regards,
Gotcha, I have attached a snapshot of the console output. I think it might be something due to the setup of the db instance since it says user is not allowed to do action. Would you be able to troubleshoot?
Thanks for the message, reviewing it and looking back at your .ini file. It looks like your .ini file has in both the URI strings. This is different from the sample_mflix database that will be used so I’d recommend revisiting Chapter 0 and the lesson “Introduction and Setup” to ensure your connection is correct.
A quick test would be to change “myFirstDatabase” to “sample_mflix” in your .ini, if this works then it was the configuration string in your .ini that caused the issue.
Hi Eoin, thank you for your help in troubleshooting! You were correct the URI strings were off. I switched out and added sample_mflix in the URI strings. I also had a dependency issue causing issues. I had the package PyJWT=2.0.0. I reinstalled the package to PyJWT==1.7.1 and got the app to work. Just letting know for future reference in case. Thank you for looking into and troubleshooting!
That’s great to hear it is working and you can progress. We’ll review the current dependency packaging with reference to your finding on PyJWT == 1.7.1
Thanks for sharing your solution and good luck with the rest of the course!