Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: invalid syntax #49

Closed
chriswike opened this issue Feb 21, 2019 · 3 comments
Closed

SyntaxError: invalid syntax #49

chriswike opened this issue Feb 21, 2019 · 3 comments

Comments

@chriswike
Copy link

chriswike commented Feb 21, 2019

Trying to setup PADD on a brand new install of pihole, PADD Version 3.0.2

When trying to run padd.sh I get the following error:

File "padd.sh", line 23 today=$(date +%Y%m%d) ^ SyntaxError: invalid syntax
Is this possibly a locale error?

When I run locale -va output

`
locale: en_GB.utf8 archive: /usr/lib/locale/locale-archive

title | English locale for Britain

source | RAP
address | Sankt Jørgens Alle 8, DK-1615 København V, Danmark
contact | Keld Simonsen
email | bug-glibc-locales@gnu.org
language | British English
territory | United Kingdom
revision | 1.0
date | 2000-06-28
codeset | UTF-8

locale: en_US.utf8 archive: /usr/lib/locale/locale-archive

title | English locale for the USA

source | Free Software Foundation, Inc.
address | http://www.gnu.org/software/libc/
email | bug-glibc-locales@gnu.org
language | American English
territory | United States
revision | 1.0
date | 2000-06-24
codeset | UTF-8

locale: C.UTF-8 directory: /usr/lib/locale/C.UTF-8

title | C locale
email | aurel32@debian.org

language | C
revision | 1.6
date | 2016-08-08
codeset | UTF-8
`

@chriswike
Copy link
Author

I was able to fix this by editing the "~/.bashrc

I changed

if [ "$TERM" == "linux" ] ; then

to

if [ "$TERM" == "xterm" ] ; then

as referenced in this post #47 (comment)

Any ideas why the SyntaxError: invalid syntax ?

@jpmck
Copy link
Contributor

jpmck commented Feb 22, 2019

That is a mystery... I don't see any syntax error with that command at all... https://ss64.com/bash/date.html

@timkingman
Copy link

timkingman commented Apr 5, 2019

I was able to fix this by editing the "~/.bashrc

I changed

if [ "$TERM" == "linux" ] ; then

to

if [ "$TERM" == "xterm" ] ; then

as referenced in this post #47 (comment)

I think the root issue here is that auto-login is setting a term other than linux, per this raspi-config issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants