I am solely newbie in Anvil. while following the tutorial Generating PDFs with Python , all the steps are correct yet it doesnot run code. had due diligience with AI not resolved. thus i was wondering if anyone had done this tutorial. or if anyone is willing to resolve this issue.
This is the error: TypeError: init() missing 2 required arguments: ‘name’, ‘date’
Welcome to the Anvil Forum!
We hope you find this Forum and its volunteers helpful, informative, and enjoyable.
Regarding your question:
You can only get a run-time error message from running code. So the above error message proves that your copy of the app does run code.
However, the code is incomplete, likely due to an omission, hence the error message. In this case, the code is trying to construct an object, but it is not being given enough parameters to do that.
Look for code that constructs an object. It will be the name of a class, followed by parentheses. Inside the parentheses should be a complete set of parameters needed to complete the construction work. One of these cases will be short two parameters.
You haven’t provided enough information for us to pin it down any further.
For better answers, see How to ask a good question - Anvil Q&A - Anvil Community Forum.
Hope this helps. And again, welcome to the Forum!
Hello @thapa!
I just completed the tutorial, and it worked fine.
My best guess is that your Ticket form is presently marked as the being the Startup form for your app, and that if you mark the other (registration) form as the Startup instead, everything will work as expected.
Hello @tomherden ,
I followed your instruction and marked the other form startup instead the Ticket form and it worked. I appreciate your time and helping me to resolve the issue.
As I am following the course, I assume , i might get such challenge in the pathway. i hope i could contact you to help me out when it is necessary.
Hello @thapa. I’m glad that I could help!
However, I wouldn’t suggest writing me directly in future, as I often go days or even weeks between forum visits. Instead, just post to the Q&A again f you get stuck. Folks here are generally quick to help, if provided with enough information about the problem.
It can often also be useful to share a link to your app: (from the App Browser in the IDE, click the Gear icon , select Share App, and choose to publish the app publicly, then copy and paste the human-readable URL like happy-ancient-friend.anvil.app into your message.)