Tuesday, 21 September 2021

Docker - failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:X: not found 7ERROR: Service 'myservice' failed to build : Build failed


docker-compose up -d
2... 3------ 4 > [internal] load metadata for docker.io/library/python:3-onbuild: 5------ 6failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:X: not found 7ERROR: Service 'myservice' failed to build : Build failed


I found in this post that if I ran the following lines of code in terminal before my compose command, then that would eliminate the first issue I have.


1export DOCKER_BUILDKIT=0 2export COMPOSE_DOCKER_CLI_BUILD=0 3docker-compose up -d 4 5ERROR: Service 'myservice' failed to build : no matching manifest for linux/arm64/v8 in the manifest list entries


So that second line of issue looks like it may have to do with my Mac M1 chip


1ERROR: Service 'myservice' failed to build : no matching manifest for linux/arm64/v8 in the manifest list entries



Adding the 'platform: linux/x86_64' to the following services seems to have worked.


1version: '3' 2 3services: 4 myservice: 5 platform: linux/x86_64 6 container_name: myservice_container 7 build: ./myservice 8 volumes: 9 - ./myservice:/usr/src/app 10 ports: 11 - 8080:8080


Wednesday, 15 September 2021

Python Panda's - Cannot convert non-finite values (NA or inf) to integer

 In the .csv that we're processing we have a column thats 'total_in_thousands' .  

In that column the values are all in decimals and I presume the legacy code would like them to be integers. 

csv = csv.astype({'total_uv_in_thousands' : 'int64'})

However this giving me this error. 


1 astype_nansafe 2 raise ValueError("Cannot convert non-finite values (NA or inf) to integer") 3ValueError: Cannot convert non-finite values (NA or inf) to integer


To resolve this I’ve changed on NaN’s in this column to zero and it now works.
csv = csv.fillna({'total_uv_in_thousands' : 0}).astype({'total_uv_in_thousands' : 'int64'})


This works. 


Monday, 13 September 2021

MacOS Big Sur 11 . How do I see the 'Download' folder in 'Finder'

This isn't an issue specifically for Mac OS Big Sur but something I end up searching for every now and again.  I think it probably affects those of us who use Windows and Macs , as searching in Finder in default can be pretty frustrating some times.

Anyway the 'Downloads' folder was happily in the left menu of Finder and then it suddenly disappeared. 
Equally this issue and fix could apply to any of the following Folders. 

1. Recents
2. Airdrop
3. Applications
4. Desktop
5. Documents
6. Downloads
7. Movies
8. Music
9. Pictures
10. Home

To fix this in 'Finder' - click on 'Finder' on the top menu > And select 'Preferences' 


From here you can select to re-add the Downloads folder. 




Google Big Query: Why isn’t my Scheduled query saving.

 I just thought I’d note this down for others, as the logically way to fix this ( at least to me ) didn’t work.


This is in Scheduled tasks .  After clicking on the task that you want to change and then clicking on edit.  It’s easy enough to make your changes to the query and re-running it to check that it’s fine.  However when clicking on the Save button and choosing either of the Save methods, when you go back in again the Query is the same as it was before.  This is the Save button I was clicking on. 


What I needed to do though was to click on 'Schedule' and then 'Update scheduled query' 


Now when you 'Update' at the bottom of the options that displays, you'll then go back into your Scheduled query and it'll be updated :)


Monday, 16 August 2021

Vue.js Nightwatch Error connecting to localhost on port 4444

 I was receiving the above error when attempting to run my my first tests. 

Also note this in the error message. 

""Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line""

The reason for this was that I needed to install Firefox ( I'd recently renewed my laptop and it hadn't added this browser yet ! ) 

Friday, 30 July 2021

Mamp Pro - What are my Mysql details for local connection.

 I couldn't find this easily by Googling, so I thought I'd leave this as a note to myself.  

This also applied to setting up a connection on Drupal 7 .  

What I needed was  Username 'root' and password 'root' .  I'd been using 'password' which had worked with something else I'd been working on recently . 

So here's what worked. 

Name: Mysite
Host: 127.0.0.1
Username: root
Password: root
Port: 8889



And in Drupal 7 ->


<?php

$databases['default']['default'] = array(
'database' => 'mysite',
'username' => 'root',
'password' => 'root',
'host' => 'localhost',
'port' => '3306',
'driver' => 'mysql',
'prefix' => '',
);

Wednesday, 28 July 2021

How to add a Github personnel token on Mac OS Big Sur

 So when pushing to Github I've all of a sudden started to receive the following issue. 

remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.

remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.

fatal: unable to access 'https://github.com/flowmoco/siaf.git/': The requested URL returned error: 403


The first thing you'll need to do is set up Personal Access Token in Github.  Following the instructions here to do that.   Add a Personal Access Token to Github

After that I have read that you can then open 'Keychain Access' and search for github. 


Next you should be able to right click that and delete it.   

Then you'll be able to 'git push' and you'll be asked for your Username and Token Access. 

However deleting the keychain for me didn't work.   If the same happens for you then this worked for me.  

Double click on the 'github.com' in the Name column. 

From here you can change the 'Kind' to 'access token' and the Password to the Keychain password that you've been given. 





Now when you go back to 'git push' it'll work :)