Code pays #77
Unanswered
BellamyRodford
asked this question in
Q&A
Replies: 1 comment
-
|
I found the solution here it is elif 'country code' in question_text or 'code pays' in question_text: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi ,
I’m having difficulty updating my configuration file for the LinkedIn Easy Apply Bot. My goal is to provide fallback responses (for example, for the "code pays" dropdown question) in my config.yaml file. Specifically, I want to set the fallback answer for the "code pays" question to “France (+33)” so that when the bot encounters this dropdown, it selects the correct value automatically.
Here’s what I’ve been trying to do and the issues I’m encountering:
Configuring Fallback Values for Dropdown Questions:
I want to add a fallback answer for the “code pays” question. For instance, my intention is to have something similar to how simple scalar values (like universityGpa: 4.0) are defined.
In my config file, I attempted to add an entry like:
yaml
Copy
"code pays
code pays": France (+33) # Forces selection of France
This was intended to match the exact text of the dropdown as seen on the page (which appears to include a newline, i.e., the question is shown on two lines: "code pays" followed by "code pays").
Encountered YAML Parsing Error:
However, when I run the bot, I receive the following error:
pgsql
Copy
yaml.scanner.ScannerError: mapping values are not allowed here
in "config.yaml", line 105, column 11
This error suggests that the YAML parser is having trouble with the way the multiline key is defined. It seems that the parser isn’t accepting the actual newline in the key.
Attempts to Fix the Issue:
I then tried to represent the newline using an escape sequence, modifying the key as follows:
yaml
Copy
"code pays\ncode pays": "France (+33)"
While this approach seems more correct from a YAML perspective, I am still not entirely sure if this is the best way to define a fallback answer for the dropdown question. I would like to know:
Is using the newline escape sequence (\n) the recommended method when the actual question text contains a newline?
Should fallback answers (which are textual) be placed in a separate section (like unpreparedQuestions) or is there a different approach for mixing them with other value types (like numeric values in the experience section)?
Are there any best practices you recommend for updating the configuration file when it includes different types of values (e.g., plain scalars, numeric values, multiline keys)?
Context and Impact:
My overall goal is to ensure that the bot correctly recognizes and applies my fallback answer for the "code pays" dropdown. The dropdown options on the page include a list such as ['Sélectionnez une option', 'Îles de Géorgie du Sud et îles Sandwich du Sud (+0)', 'France (+33)', ...], and I want the bot to choose “France (+33)” when it encounters the “code pays” question.
If the key in my config file does not exactly match the text that the bot reads (after lowercasing and accounting for newlines or whitespace), then the bot defaults to selecting the last option from the dropdown.
I need guidance on how best to format these entries so that the YAML parser accepts them and the bot uses them as intended.
I appreciate your help with this matter. Could you please provide guidance or an example of how to update the config file for these different value types (particularly for keys that may contain newlines or require exact text matching)?
Thank you for your assistance.
Best regards,
Beta Was this translation helpful? Give feedback.
All reactions