This is a completely subjective post. I do enjoy this coffee immensely and why not have a cup by your side when coding. I was going to link to it from the https://www.stumptowncoffee.com web site but I cannot find it there. I usually get it at Whole Foods: Colombia Los Picos. Lighter roast and oh so very flavorful. It’s on the pricey side. Makes a good gift too.
When switching to using chromedriver and away from PhantomJS these messages were everywhere. They are a bit misleading.
StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
A simple time.sleep() would immediately fix it. Then we searched for more elegant ways to wait for the element.
The error message mentions stale element which one might associate with old and outdated, but in fact it’s actually too new.
This is a common issue with Chrome Driver. There are a bunch of discussion boards where requests are made to have this fixed but for some reasons Chrome developers are stubborn in not fixing it. How about they ask their customers what they would want!
Anyways, this helps. It moves the element into view. For a set of tests we had that worked fine with PhantomJS (too bad dev was discontinued) and Firefox, errors came up with Chrome. This was along the lines of : element is not clickable at point. Other element would receive the click.
Before the element that has that error, you could input this line (change the element please, unless you are clicking on Good Morning! text:
self.driver.execute_script("arguments.scrollIntoView();", self.driver.find_element_by_link_text('Good Morning!'))
That fixed it for us and did not break PhantomJS and/or Firefox compatibility.
These started occurring in 2017.3. I had to revert to an older version to continue work. Now with PyCharm 2017.3.2 it’s working again.
In case you need to download and install an older version, here is the link: https://www.jetbrains.com/pycharm/download/previous.html
As just about everyone else I am switching my hard drive to an SSD.
Purchased the Samsung 850 EVO 1TB 2.5-Inch SATA III Internal SSD (MZ-75E1T0B/AM). That all arrived well.
Also then bought a Sabrent cable, SATA to USB 3.0 (under $10).
The problems started occurring when I was cloning the drives using Samsung’s Data Migration Software.
Note : My existing drive (SATA II internal) has been showing errors when using various HD inspection tools so that is one possible cause of slowness. It was also becoming very slow during general operation which was the reason to switch to SSD.
- I was cloning approximately 670GB of data on 931TB drive
- On the initial attempt transfer rate was 1MB/s. The estimate was 300+ hours to complete so I aborted that.
- I then plugged the cable into the USB 2.0 port. That produces speeds around 25MB/s but still very slow
- Then I switched back to plugging it into the USB 3.0 port. This time, speeds got up to 59MB/s and the promised completion time was under 4 hours which is acceptable. However, half way through it slowed down to 1MB/s and I had to cancel.
- Following some online research I proceeded to: disable Microsoft real time virus protection, disconnected the network drives that were mounted and also disconnected the Ethernet cable from the PC completely diabling networking.
- That worked. Speeds were again near 60MB/s and the clone took under 3.5 hours. Success.
I do know that USB 3.0 should provide higher transfer rates, but at this point I was just happy to get this done. I did not have time to investigate more.
After upgrading to PyCharm 2017.3 I am not able to run my tests properly. Any time an error is encountered, the test case does not fail and move on, it just stops executing. Downgrading to PyCharm 2017.2.4 resolves the problem.
Here are the errors I get:
jb_nosetest_runner.py", line 17, in
... etc etc etc .....
ec, ev, tb = err
TypeError: 'NoneType' object is not iterable
Here is what worked for me related to Chrome in headless mode:
First import a few modules:
from selenium import webdriver from selenium.webdriver.chrome.options import Options
Then set the driver:
chrome_options = Options() chrome_options.add_argument("--headless") chrome_options.binary_location = "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" self.driver = webdriver.Chrome(executable_path="C:/webdriver/chromedriver.exe",chrome_options=chrome_options)
Please make sure to change the binary location to where Chrome is installed on your system. Also, you will need the latest chromedriver.exe executable (downloadable from here : https://sites.google.com/a/chromium.org/chromedriver/.). You will need to put its location in the executable_path. You will need Selenium 3.8.0 approximately as well.
Get it from the extension manager in VS Code: REST Client by Huachao Mao
GitHub fun is here:
I wanted to include some examples, but then I saw the documentation in VS Code for this extension and it’s very good. Just scroll through the Details tab and get the instructions how to use. It’s quite simple, including, something like
GET https://httpbin.org/uuid for a simple get.
This worked for me :
Import few modules:
from selenium import webdriver from selenium.webdriver.firefox.options import Options as FFOptions
then set the driver:
options = FFOptions() options.add_argument('--headless') self.driver = webdriver.Firefox(firefox_options=options)
Please note that you have to have the latest FF (57 will do) and selenium 3.8.0 approximately.
I needed to document this here as every new release I run into the same issue when starting Blender. It crashes on start. Found the solution on the net:
Create a batch file to start Blender. I named mine blender.bat (quite original).
Contents of the file :
set PYTHONPATH="" cd C:\Program Files\Blender Foundation\Blender\ start blender.exe
Adjust your install location as needed. Then just save and double click to start. Voila!