justason
When I try to launch it manually:

./ start_openplc.sh
Traceback (most recent call last):
File "webserver.py", line 2080, in <module>
openplc_runtime.project_name = str(row[1])
TypeError: 'NoneType' object has no attribute '__getitem__'
Quote 0 0
thiagoralves
That happens when you delete the program that was running and don’t put another one in place. The easiest way to fix is to git clone and reinstall.
Quote 0 0
justason
Please instruct how to fix that without reinstalling.
For me tht is happening every time I reboot.
Quote 0 0
adriano.mele

Hi Thiago,

I had the same issue (on Windows). The rebase shortcut did not seem to work, thus I just re-installed the runtime from the download page on the official site.

However, now I get another error:

OpenPLC Runtime was not installed correctly. Please run Rebase OpenPLC program.
 
If I run the rebase, I get:
 
fatal: unable to access 'http://github.com/thiagoralves/OpenPLC_v3.git/': Could not resolve host: github.com
 
I googled and tried a couple of fixes I found online, but none seem to work.
Has it ever happened to you? (or anyone else willing to help?)
 
 
 
Quote 0 0
adriano.mele
I also tried uninstalling and starting from scratch, but still I get the same error (which I never had before)
Quote 0 0
thiagoralves
"Could not resolve host: github.com" means that either you don't have connection to the internet or you have some local policies and restrictions that prevent you for accessing github.com. In any case, have you tried following the TROUBLESHOOTING section here https://www.openplcproject.com/getting-started-windows 
Quote 0 0
adriano.mele

This is quite strange. If I try to rebase with the app included in the sw package, I get that error.

However, if I do it from git bash it works. I am cloning OpenPLC_v3 in the Runtime/home/[user]/ folder (as in https://openplc.discussion.community/post/openplc-runtime-doesnt-start-on-windows-7-9784367). I will also have a look at the link you posted.

 

However, I had already installed OpenPLC and everything seemed to work flawlessly before this issue, so I do not see what may have changed (?)

Quote 0 0
adriano.mele

I tried to clone the repository, re-install cygwin and manually run the OpenPLC installer with the win option (in Runtime/home/OpenPLC_v3/install.sh)

 

Should it be useful, here is the installation log (it failed)

 

Installing OpenPLC on Windows
/usr/bin/apt-cyg: riga 25: $'\r': comando non trovato
/usr/bin/apt-cyg: riga 121: errore di sintassi vicino al token non atteso "$'{\r'"
/usr/bin/apt-cyg: riga 121: `function wget {
'
/usr/bin/apt-cyg: riga 25: $'\r': comando non trovato
/usr/bin/apt-cyg: riga 121: errore di sintassi vicino al token non atteso "$'{\r'"
/usr/bin/apt-cyg: riga 121: `function wget {
'
/usr/bin/apt-cyg: riga 25: $'\r': comando non trovato
/usr/bin/apt-cyg: riga 121: errore di sintassi vicino al token non atteso "$'{\r'"
/usr/bin/apt-cyg: riga 121: `function wget {
'
/usr/bin/apt-cyg: riga 25: $'\r': comando non trovato
/usr/bin/apt-cyg: riga 121: errore di sintassi vicino al token non atteso "$'{\r'"
/usr/bin/apt-cyg: riga 121: `function wget {
'
./background_installer.sh: riga 149: lynx: comando non trovato
./background_installer.sh: riga 151: pip: comando non trovato
./background_installer.sh: riga 152: pip: comando non trovato
./background_installer.sh: riga 153: pip: comando non trovato
./background_installer.sh: riga 154: pip: comando non trovato

[MATIEC COMPILER]

[ST OPTIMIZER]

[GLUE GENERATOR]

[OPEN DNP3]

[LIBMODBUS]
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: linking file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
[...]
checking whether TIOCM_RTS is declared... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: error: cannot find input file: `
.in'
make: *** Nessuna regola per generare l'obiettivo «install». Arresto.
Error installing Libmodbus
OpenPLC was NOT installed!

 

 

EDIT - just left the error messages for readability

Quote 0 0
thiagoralves
It is possible that your system has some restrictions in running Cygwin commands in a batch file (this is what OpenPLC installer does). However, running the commands directly from Cygwin prompt usually works, as in this case the user is probably entering the input himself. That's why one of the troubleshooting items in the list is to install Cygwin and run the commands manually.
Quote 0 0
adriano.mele

The log above was obtained running the installer directly from cygwin (./install.sh win).

I am now trying to also re-install cygwin manually... I remember it was easier the first time I did it 😃

Quote 0 0
adriano.mele

I think I found something.

Apparently, the cygwin DNS were set to something weird. Running ipconfig -all returned the DNS server 192.168.1.1.

I simply changed my connection settings changed the automatic DNS to the google DNS (8.8.8.8/8.8.4.4), and now both git clone and rebase work.

 

EDIT - I confirm that changing the DNS and rebasing solved the issue. Hope this helps someone

 

 

Quote 0 0