Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To Post If A Board Has A Section #7

Open
bowtiedyosemite opened this issue May 19, 2021 · 3 comments
Open

Unable To Post If A Board Has A Section #7

bowtiedyosemite opened this issue May 19, 2021 · 3 comments

Comments

@bowtiedyosemite
Copy link

//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?

@hevalhazalkurt
Copy link
Owner

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 "},
                }

@SarkarPranab
Copy link

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"]`

@NulledTerminator
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants