Google Merchant Center test account

How to manage your product feed for google adds through API.

Google ads account -> test account
Google Merchant account -> test account

Set Google API access

Navigate to console.cloud.google.com and create a new project

Click on API & Services

In library, look for Merchant API

Click on the Merchant API result and then click on the Enable button

Create Credentials

Click on Credentials > create credentials

Click on Help me choose

Select Merchant API and User Data

Click on Next

Add A scope: search for Merchant API and tick the box

Click on save and continue
in OAuth choose Web application

Add Authorized redirect URI for the postman application: https://oauth.pstmn.io/v1/callback

(you can add serveral URI)

Click on Create
On the next sceen click on Download your credentials and then click on done.

Add test users in google cloud API

in google cloud, navigate to audience and then scroll down to add users.

Add developers in Merchant Account

in Merchant Center, add a user in Setting > Access and services > add person (or manage an existing user) untick admin and make sure to to tick API developer.

Alternatively you can do that though API call

Set up postman

You can follow the steps here https://quickstarts.postman.com/guide/google-oauth-in-postman/index.html?#3 but you’ll need to change the scope for the appropriate scope for the Merchant API. Scopes can be found here:

https://developers.google.com/identity/protocols/oauth2/scopes

Look for merchant API


Install a python library in python virtual environment venv: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified

Error: When running pip install in venv, on Windows 10, the following error is displayed:

WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'C:\Python311\Scripts\google-oauthlib-tool.exe' -> 'C:\Python311\Scripts\google-oauthlib-tool.exe.deleteme'

Solution: run

py -m pip install [the package you want to install]

Script cannot be loaded because running scripts is disabled on this system. For moreinformation, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Error: when running the activation script for my python virtual environment, the I had the following error on Win10

Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Solution: Open a powershell as admin and run the following command

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

hit Y and press the Enter key.

tensorflow error: internal: libdevice not found at ./libdevice.10.bc Ubuntu – Solved

Context: I got this error when running tensorflow with python on Ubuntu 20.04, after installing the cuda toolkit by choosing the local deb installation file.

Solution: the solution was to download and install the deb network file instead

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04

Google Cloud Vision Set Up on Windows. google module not found in virutalenv

Issue:
The following error is displayed when trying to import google vision in the virtualenv after following the installation process.

Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'google'

Google cloud installation instruction:

https://cloud.google.com/python/docs/reference/vision/latest#installation

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-vision

Solution:

To run python in the virtual environment, use the python command instead of python3

git returns ” is a merge but no -m option was given.”

Error:

git revert 75a690a642b71768dad36ade65839a6da62d8d6a
error: commit 75a690a642b71768dad36ade65839a6da62d8d6a is a merge but no -m option was given.
fatal: revert failed

Solution:

run the following command in the terminal:

git cat-file -p 75a690a642b71768dad36ade65839a6da62d8d6a

Output:

git cat-file -p 75a690a642b71768dad36ade65839a6da62d8d6a
tree 6ee9397d91ed42ad3d130b93c5c5587d1ad6c67c
parent 95beda2bfbfa1523cb14c1285d80a5faa9b7f6f0
parent a3e9ddabca322e52b141a001dc5eb9c2c789ff22

run

git revert 75a690a642b71768dad36ade65839a6da62d8d6a -m 1 

if you want to use the first parent as mainline, choose 1, else choose 2

Test site through VPN or local on browserstack

Browserstack resources:

https://www.browserstack.com/docs/live/local-testing

1 – Install the browserstack local binary

https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip

2 – cd in the directory where the binary is located and run:

./BrowserStackLocal --key t9guUg6zxQ5Y9MBfciaZ

3- in your browser access borwserstack and tick “Resolve all URLs through my network

you can also do that throught cli when running the binary:

./BrowserStackLocal --key t9guUg6zxQ5Y9MBfciaZ --force-local

For local testing, ensure that localhost is served on bs-local.com

see https://www.browserstack.com/docs/live/local-testing/test-using-local-testing