Go to advanced search

by DougieLawson
Sun Nov 18, 2018 11:54 am
Forum: Python
Topic: Can't find module in 3.5 but can in 2.7
Replies: 4
Views: 344

Re: Can't find module in 3.5 but can in 2.7

Use sudo pip3 install ... to install for python3. Use sudo pip install ... for python2 stuff.
by DougieLawson
Sun Nov 18, 2018 11:52 am
Forum: General discussion
Topic: mysql removal
Replies: 1
Views: 93

Re: mysql removal

sudo apt purge mysql* mariadb*
by DougieLawson
Sun Nov 18, 2018 10:46 am
Forum: Other programming languages
Topic: javascript not working on RPi 3
Replies: 32
Views: 1932

Re: javascript not working on RPi 3

That's no excuse for sloppy security. It may not be connected today, it may be in the future.

What's so hard about doing it the right way now. You'll learn something in the process.
by DougieLawson
Sun Nov 18, 2018 10:43 am
Forum: Troubleshooting
Topic: command sudo apt-get update stuck at 0%
Replies: 12
Views: 421

Re: command sudo apt-get update stuck at 0%

Your Raspberry is not connected to the public internet in that case.

You can see that with the 169.254.xxx.xxx address. Check the cable from your RPi to your router.
by DougieLawson
Sun Nov 18, 2018 10:39 am
Forum: Troubleshooting
Topic: no /home/pi/.config/lxsession ?
Replies: 8
Views: 518

Re: no /home/pi/.config/lxsession ?

Simon Long needs a session with my well polished educational baseball bat. He has done this stuff too often and it's 100% unacceptable. A software upgrade shouldn't break things unless it's a switch from Stretch to Buster when you'll be on the lookout for breakages. If I did this for a commercial cl...
by DougieLawson
Sun Nov 18, 2018 10:34 am
Forum: AIY Projects
Topic: None of the assistant_library voice demos work
Replies: 16
Views: 1718

Re: None of the assistant_library voice demos work

If you do choose the update or have already done it you'll need to clone the repo at https://github.com/google/aiyprojects-raspbian to get your AIY running again.

That was updated a couple of days ago.
by DougieLawson
Sun Nov 18, 2018 10:29 am
Forum: Troubleshooting
Topic: no /home/pi/.config/lxsession ?
Replies: 8
Views: 518

Re: no /home/pi/.config/lxsession ?

Use ls -la as .config is a hidden folder.
by DougieLawson
Sun Nov 18, 2018 10:27 am
Forum: C/C++
Topic: Can not install C library on raspberry pi3
Replies: 6
Views: 520

Re: Can not install C library on raspberry pi3

Go and ask the hardware/software vendor to provide a library for your alien hardware.

Move your application back to an X86 / X86_64 computer like an Intel Nuc.
by DougieLawson
Sun Nov 18, 2018 10:24 am
Forum: Troubleshooting
Topic: no /home/pi/.config/lxsession ?
Replies: 8
Views: 518

Re: no /home/pi/.config/lxsession ?

The stupid desktop update moved that to ~/oldconfig/.config/...

Move it back and it will start working.

I've no idea why the update didn't ask what I wanted or give an option to keep the file in place. It's a pile of stinking stuff to just arbitrarily break things in this way.
by DougieLawson
Sat Nov 17, 2018 8:08 pm
Forum: Raspbian
Topic: Pre login message screen
Replies: 2
Views: 598

Re: Pre login message screen

/etc/issue works for locally connected try devices.

For remote connections it's /etc/issue.net
by DougieLawson
Sat Nov 17, 2018 6:43 pm
Forum: Beginners
Topic: Pi VPN - Tomato Shibby Router
Replies: 3
Views: 222

Re: Pi VPN - Tomato Shibby Router

An OpenVPN xxx.ovpn file needs all three sections <ca>...</ca><cert>...</cert><key>...</key>.

CA is the certificate authority certificate (usually self-signed). CERT is your client certificate (signed with the CA cert). KEY is the private key (so needs to be kept secure) for your CERT.
by DougieLawson
Sat Nov 17, 2018 6:37 pm
Forum: Python
Topic: error in the code
Replies: 3
Views: 351

Re: error in the code

The other thing is that GPIO4 is usually used for the kernel 1-wire driver. If you're trying to read a temp value from a 1-wire device then the kernel driver is your friend (don't need any of that python code you've half posted). Enable 1-wire in the GUI. Then read your 1-wire sensor with this pytho...
by DougieLawson
Sat Nov 17, 2018 6:30 pm
Forum: Advanced users
Topic: PI 2 B CAN CHOOSE WI FI from 2 NETWORKS?
Replies: 3
Views: 433

Re: PI 2 B CAN CHOOSE WI FI from 2 NETWORKS?

country=GB ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="NETWORK2" priority=90 psk="passwordfornet2" } network={ ssid="NETWORK1" priority=100 psk="passwordformostlikelytobeusednetwork" } network={ ssid="NETWORK3" priority=80 psk="passwordforleastpreferednet...
by DougieLawson
Sat Nov 17, 2018 6:14 pm
Forum: Weather station
Topic: Total noob here. Personal WS
Replies: 21
Views: 1009

Re: Total noob here. Personal WS

On my system that stuff is in /etc/apache2/mods-available/php7.0.conf

so sudo a2enmod php7.0 should activate it. I've added that to my pull request for the new version of the weather-station-www code.
by DougieLawson
Sat Nov 17, 2018 5:48 pm
Forum: Weather station
Topic: Total noob here. Personal WS
Replies: 21
Views: 1009

Re: Total noob here. Personal WS

Then I can't see how your web site is failing, that log looks normal.
by DougieLawson
Sat Nov 17, 2018 5:11 pm
Forum: Troubleshooting
Topic: RPIZW - Wifi Chip.
Replies: 29
Views: 741

Re: RPIZW - Wifi Chip.

ShiftyRP wrote:
Sat Nov 17, 2018 3:43 pm
So how did NOOBS be able to detect my network then?
No idea, because my crystal ball went offline in the "Great Crystal Ball Disaster of 1989" and you're not telling us everything that you've tried and failed to do to resolve things.
by DougieLawson
Sat Nov 17, 2018 5:09 pm
Forum: General discussion
Topic: mysql -u root
Replies: 6
Views: 282

Re: mysql -u root

You're probably better off running sudo mysqld_safe to get it to repair damaged tables and restart.
by DougieLawson
Sat Nov 17, 2018 3:39 pm
Forum: Troubleshooting
Topic: RPIZW - Wifi Chip.
Replies: 29
Views: 741

Re: RPIZW - Wifi Chip.

I think it's safe to assume that you've broken your hardware and need the £10 fix.
by DougieLawson
Sat Nov 17, 2018 1:27 pm
Forum: General discussion
Topic: priveleges
Replies: 16
Views: 680

Re: priveleges

by DougieLawson
Sat Nov 17, 2018 12:43 pm
Forum: General discussion
Topic: priveleges
Replies: 16
Views: 680

Re: priveleges

sudo mysql -u root
will get you a MySQL (aka MariaDB) command line (no password needed on DebIan/Raspbian Stretch).
by DougieLawson
Sat Nov 17, 2018 10:20 am
Forum: Camera board
Topic: live stream camera from python file?
Replies: 2
Views: 480

Re: live stream camera from python file?

It's probably easier to use the picamera python library rather than spawning raspivid.

https://picamera.readthedocs.io/en/rele ... ipes1.html
by DougieLawson
Sat Nov 17, 2018 9:59 am
Forum: Troubleshooting
Topic: omxplayer plays over HDMI but not alsa nor pulseaudio
Replies: 2
Views: 129

Re: omxplayer plays over HDMI but not alsa nor pulseaudio

Try building a new SDCard with Raspbian 2018-11-13 or NOOBS 3.0.0 (which has a mass of updates for multimedia stuff).
by DougieLawson
Sat Nov 17, 2018 9:57 am
Forum: Weather station
Topic: Total noob here. Personal WS
Replies: 21
Views: 1009

Re: Total noob here. Personal WS

Look in the logs at /var/log/apache2
by DougieLawson
Sat Nov 17, 2018 3:01 am
Forum: Troubleshooting
Topic: RPIZW - Wifi Chip.
Replies: 29
Views: 741

Re: RPIZW - Wifi Chip.

You've not set your country code. The rfkill program will have disabled your WiFi interface.

Try a sudo rfkill list all command.
by DougieLawson
Sat Nov 17, 2018 2:48 am
Forum: Python
Topic: How to filter out letters from strings and only keep numbers
Replies: 6
Views: 498

Re: How to filter out letters from strings and only keep numbers

helpthepi wrote:
Fri Nov 16, 2018 9:17 pm
Input is something like: temp=33.6C which is string. I need the output to be just 33.6

Code: Select all

[0-9]+\.[0-9]+
will match that.

Code: Select all

#!/usr/bin/python3

import re

inputstr = "temp=33.6C"
regex = "[0-9]+\.[0-9]+"

x = re.search(regex, inputstr)

print (x.group(0))

Go to advanced search