Unable To Post If A Board Has A Section
//Error
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//button[@data-test-id='board-dropdown-save-button']"} (Session info: chrome=90.0.4430.212)
//How This error occurs whenever I have a board with a section. The code always stops once it reaches the part to Publish to the board. Any help on this matter?
Hi @J2YT3X ! I'm working on the next version of PinPy however the available version is also working. If you can't save your pin into the boards it's probably because you didn't structure your board settings properly. Please check the README file again and make sure your board and keywords looks like below.
board_data = {"development": {
"keywords": ["PYTHON", "JAVASCRIPT", "FREECODECAMP", "HTML", "CSS", "DEVELOPER", "PROGRAMMING", "TUTORIAL"],
"link": "//*[@title='Developer's Corner']",
"tags": "#developer #development #python #freecodecamp #coding "},
"photography": {
"keywords": ["PHOTOGRAPHY", "CAMERA", "PORTRAIT", "NATURE", "CANON", "NIKON", "PHOTO" ],
"link": "//*[@title='Professional Photography World']",
"tags": "#photography #photo #landscape #camera #nature #portrait "},
}
Hey @hevalhazalkurt , Can you help me out here I am also trying to fix this problem. Anyway Nice bot you made.
ERROR//
**_line 187, in <module>
name, board, tags, link = pre_name(), pre_board()[0], pre_board()[1], pre_link()
TypeError: 'NoneType' object is not subscriptable_**
Most exception problem coming from here
def pre_board():
general = "#blog #writing #tutorial"
for i in board_data.keys() :
for x in board_data[i]:
for y in board_data[i]["keywords"]:
if y in pre_name():
return(board_data[i]["link"], general + board_data[i]["tags"])
#return general + board_data[i]["tags"]`
Hello @hevalhazalkurt , I am also running into the issue described by @SarkarPranab. I broke the variable assignments down to their own line so I could see which one was causing the issue:
# Pinning from file login() i = 0 while i < len(image_list): for img in image_list: name = pre_name() board = pre_board()[0] tags = pre_board()[1] link = pre_link()
I set the directory for the default images and left the links.txt as is and I am still getting this error:
Traceback (most recent call last): File "C:\Users\<user>\Documents\PinPy-master\pin.py", line 171, in <module> board = pre_board()[0] TypeError: 'NoneType' object is not subscriptable