Closed vestingz closed 4 months ago
Try changing the name of the variable name from user.signature
to user_signature
.
The dot .
has special meaning in Python. If you use user.signature
as a variable name, that assumes that user
is a Python object. If you define user
with a text field, then user
will be a string of text (what Python calls an str
) and a string cannot have attributes like .signature
.
objects:
- user: Individual
---
question: |
What is your name?
fields:
- Your name: user.name.first
---
question: |
Please sign your name below.
mandatory: true
signature: user.signature
under: |
${ user }
Closing this for now.
Thank you so much; that was indeed my mistake. I got confused reading the documentation.
Sorry for not replying earlier; I went on holidays and didn't check my mail for a while. Have a good day! :)
I am running docassemble via docker:
sudo docker run -d -p 8088:80 -p 4430:443 --restart always --stop-timeout 600 jhpyle/docassemble
In the playground I have the following interview:
After putting the signature in the respective field and pressing "Continue", the following error appears:
Error: AttributeError: 'str' object has no attribute 'signature'
In a more complex interview where I had called the
user.signature
variable to fill a PDF, the following error appears:OS: Linux m720q 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux Docker version 26.1.0, build 9714adc Chromium 124.0.6367.60 (Guest profile with no addons)