Open Myfootnotsmelly opened 1 year ago
Hi, I am so sorry to bother you, have you salve this issue right now? please feel free to text me, thank you very much
Some functions have changed because library version updates, compared to the initial code released by the author. However, I made the following efforts to ensure the proper functioning of the program:
First make sure the version of Google Chrome and Chrome driver are compatible, and altered the 40th line in code/pdf_info.py
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
browser = webdriver.Chrome(chrome_options=chrome_options)
I changed "selenium" version to 4.15.2
selenium==4.15.2
Afterwards, I updated the 46th line in the code/pdf_info.py
page_layout = browser.find_element_by_xpath("/html/body/img")
with
page_layout = browser.find_element("xpath","/html/body/ing")
cause Selenium just removed that method in version 4.3.0 refering to https://stackoverflow.com/questions/72754651/attributeerror-webdriver-object-has-no-attribute-find-element-by-xpath
Thank you very much for your answering, it is very clear now. I have a little one more questions, in the file renderer.py I already replace the original imagemagickPath by my imagemagickPath = imagemagickPath = '/usr/pengyuan/others/ImageMagick-7.0.3-5-portable-Q16-x86/convert.exe'.
IndexError Traceback (most recent call last)
IndexError: list index out of range
Do you have any idea about the solutiton? I appreciate for the assistance.
Thank you very much for your answering, it is very clear now. I have a little one more questions, in the file renderer.py I already replace the original imagemagickPath by my imagemagickPath = imagemagickPath = '/usr/pengyuan/others/ImageMagick-7.0.3-5-portable-Q16-x86/convert.exe'.
And then I always get the error:
0 1 2 3 4 5 6 7 8 9 10 IndexError Traceback (most recent call last) in <cell line: 1>() 60 61 # print(images) ---> 62 page_fig = images[page_no-1] 63 rendered_size = page_fig.size 64
IndexError: list index out of range
Do you have any idea about the solutiton? I appreciate for the assistance.
it's ok for me in linux due to it taking the "else" branch, there's no need for further adjustments to the code you've mentioned. Sorry for having no idea with your question.
I am trying to get selenium to work but I get the error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/ing"}
There is no Xpath with the name html/body/ing
I tried ing and img
do you have any idea?
What are the required dependencies for the same. chromedriver, XpdfReader tools and what else?
Some functions have changed because library version updates, compared to the initial code released by the author. However, I made the following efforts to ensure the proper functioning of the program:
- First make sure the version of Google Chrome and Chrome driver are compatible, and altered the 40th line in code/pdf_info.py
chrome_options = Options() chrome_options.add_argument('--headless') chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') browser = webdriver.Chrome(chrome_options=chrome_options)
- I changed "selenium" version to 4.15.2
selenium==4.15.2
- Afterwards, I updated the 46th line in the code/pdf_info.py
page_layout = browser.find_element_by_xpath("/html/body/img")
with
page_layout = browser.find_element("xpath","/html/body/ing")
cause Selenium just removed that method in version 4.3.0 refering to https://stackoverflow.com/questions/72754651/attributeerror-webdriver-object-has-no-attribute-find-element-by-xpath
I am trying to get selenium to work but I get the error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/ing"}
There is no Xpath with the name html/body/ing
I tried ing and img
do you have any idea?
Sorry, a mistake. It should be 'img', and it works in my case.
What are the required dependencies for the same. chromedriver, XpdfReader tools and what else?
Some functions have changed because library version updates, compared to the initial code released by the author. However, I made the following efforts to ensure the proper functioning of the program:
- First make sure the version of Google Chrome and Chrome driver are compatible, and altered the 40th line in code/pdf_info.py
chrome_options = Options() chrome_options.add_argument('--headless') chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') browser = webdriver.Chrome(chrome_options=chrome_options)
- I changed "selenium" version to 4.15.2
selenium==4.15.2
- Afterwards, I updated the 46th line in the code/pdf_info.py
page_layout = browser.find_element_by_xpath("/html/body/img")
with
page_layout = browser.find_element("xpath","/html/body/ing")
cause Selenium just removed that method in version 4.3.0 refering to https://stackoverflow.com/questions/72754651/attributeerror-webdriver-object-has-no-attribute-find-element-by-xpath
version of xpdftools is 4.04, google-chrome is 89.0.4389.114, and version of chromedriver close to google-chrome is ok.
Can someone share a working code? I tried and I got the Image but the colors are different (like the negatice of a photo) and no axis in the image. Can someone help me?
@Myfootnotsmelly Hello. Do you have any idea on my code?
@Myfootnotsmelly Hello. Do you have any idea on my code?
sry your code is not available yet. Btw, some errors also appear when i use this repo, such as failure to capture figure and some confusing layout and etc, maybe your issue is the function this repo could not support.
Thanks for your message, I created a wrapper that actually combines this code with another (figsplit). Thanks anyway.
I am using xpdf-tools-win-4.04 to execute the following command:
While it generates html with confusing layout like this It leads to failing to extract image and caption, how to handle the problem?