|
From: | Vincenzo Mone |
Subject: | R: R: Cannot run a command |
Date: | Mon, 7 Sep 2020 10:24:40 +0200 |
Hi Chris, I have tried your command and it seems it worked in part as the program started but it is not complete with the datas I mean this is what I got when I run the command after ran your suggested command: While I should get like this: How you can see I have error in the bottom window and the right top is not filled. Finally when I close it the terminal windows does not close I mean it does not give the prompt back. Thanks for your nice job 73’s de Enzo IK8OZV EasyLog 5 BetaTester EasyLog PDA BetaTester WinBollet BetaTester D.C.I. CheckPoint Regione Campania Skype: ik8ozv8520 ********************************* ****** GSM +39 328 7110193 ****** ***** SMS +39 328 7110193 ***** ********************************* > -----Messaggio originale----- > Da: Chris Gorman <chrisjohgorman@gmail.com> > Inviato: domenica 6 settembre 2020 22:27 > A: Vincenzo Mone <vimone@alice.it> > Oggetto: Re: R: Cannot run a command > > Hi Vincenzo, > > I just googled what you are working on, > https://github.com/bg2bhc/gr-lilacsat , looks interesting. When looking at it, > they used ubuntu 14.04 LTS, which is likely not what you are using. He even > stated on his page that he would welcome changes that fixed this for 16.04, > which is also probably not what you're using. You will probably have > difficulties getting this to work as your development environment is different > than theirs. They were using PyQt4 and python2 along with an older > gnuradio that used xml. That said, I would try running 2to3 on all the python > files and change any references to PyQt4 to PyQt5 and cross your fingers, > when you try running it. > > To answer your question, I would try running 2to3 on all python files. > > running something like ... > > find /home/enzo/gr-lilacsat-pyqt5 -name "*.py" -exec 2to3 -w {} \; > > I will give it a try after my supper, if I can. That said, I don't know if it will work > with my hardware. > > Chris > > On Sun, Sep 6, 2020 at 3:11 PM Vincenzo Mone <vimone@alice.it> wrote: > > > > Apologies Chris, > > > > you said to run the 2to3 command on all the scripts that get called from > mun_downlink_proxy.py. > > > > Please can you tell me all the scripts that I have to run the command > > or how to do to know > > > > Which one are? > > > > Thanks for your collaboration and understanding > > > > > > > > > > > > > > > > 73’s de Enzo IK8OZV > > EasyLog 5 BetaTester > > EasyLog PDA BetaTester > > WinBollet BetaTester > > D.C.I. CheckPoint Regione Campania > > Skype: ik8ozv8520 > > > > > > > > > > ********************************* > > > > ****** GSM +39 328 7110193 ****** > > > > ***** SMS +39 328 7110193 ***** > > > > ********************************* > > > > > > > > Da: Chris Gorman <chrisjohgorman@gmail.com> > > Inviato: domenica 6 settembre 2020 20:58 > > A: Vincenzo Mone <vimone@alice.it> > > Oggetto: Re: R: Cannot run a command > > > > > > > > > > > > > > > > On Sun, Sep 6, 2020 at 2:13 PM Vincenzo Mone <vimone@alice.it> wrote: > > > > Thank s Chris for your help. > > > > As I said before I am not so clever on the Linux so you have to drive > > me by hand > > > > Like a little child when he goes to the school for the first time Lol. > > > > > > > > No problem, we all have to learn somewhere. :) > > > > > > > > BTW I have tried as you said with the command: > > > > > > > > 2to3 -w > > /home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/mun_ > > downlink_proxy.py > > > > > > > > But as I do I not had the program I got: > > > > > > > > Command "2to3" not found, but can be installed with: > > > > > > > > sudo apt install 2to3 > > > > > > > > so I have installed it with the above suggested commandgr-lilacsat-pyqt5 > and ran again the 2to3 command and got: > > > > > > > > Command "2to3" not found, but can be installed with: > > > > > > > > sudo apt install 2to3 > > > > > > > > RefactoringTool: Skipping optional fixer: buffer > > > > RefactoringTool: Skipping optional fixer: idioms > > > > RefactoringTool: Skipping optional fixer: set_literal > > > > RefactoringTool: Skipping optional fixer: ws_comma > > > > RefactoringTool: Refactored > > /home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/mun_ > > downlink_proxy.py > > > > --- > > /home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/mun_ > > downlink_proxy.py (original) > > > > +++ /home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/ > > +++ mun_downlink_proxy.py (refactored) > > > > @@ -26,7 +26,7 @@ > > > > import datetime > > > > import xml.dom.minidom as minidom > > > > import pickle > > > > -import urllib2 > > > > +import urllib.request, urllib.error, urllib.parse > > > > from PyQt5 import QtGui, QtCore, Qt, QtWidgets > > > > # import ui confige > > > > @@ -296,7 +296,7 @@ > > > > f.close() > > > > self.reload() > > > > except Exception as error: > > > > - print("[File] Configured file read failed. Error: " + str(error)) > > > > + print(("[File] Configured file read failed. Error: " + > > + str(error))) > > > > def reload(self): > > > > ''' > > > > @@ -593,7 +593,7 @@ > > > > Exception: an error occured accessing tle file or > > grc_param.py > > > > """ > > > > try: > > > > - f = urllib2.urlopen(str(self.ui.tle_url_text.text())) > > > > + f = > > + urllib.request.urlopen(str(self.ui.tle_url_text.text())) > > > > tle = f.read() > > > > tle = tle.split("\n") > > > > @@ -641,13 +641,13 @@ > > > > log += "%02X" % ord(i) + " " > > > > count += 1 > > > > self.log_dict[index].write("Data: " + log + "\n\n") > > > > - print( > > > > + print(( > > > > "[Data] Received time is " + > > > > datetime.datetime.utcfromtimestamp( > > > > > > float(data['proxy_receive_time']/1000)).strftime( > > > > - '%Y-%m-%d %H:%M:%S')) > > > > - print( > > > > - "Data is: " + log + "\n" + "Data Length is: " + str(count)) > > > > + '%Y-%m-%d %H:%M:%S'))) > > > > + print(( > > > > + "Data is: " + log + "\n" + "Data Length is: " + > > + str(count))) > > > > self.log_dict[index].flush() > > > > def normal_output_written(self, text): > > > > RefactoringTool: Files that were modified: > > > > RefactoringTool: > > /home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/mun_ > > downlink_proxy.py > > > > > > > > Then I have tried to run again my command: > > > > > > > > python2 > > ~/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/mun_downlink_ > > proxy.py > > > > > > > > and got: > > > > > > > > Traceback (most recent call last): > > > > File > > "/home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/mun > > _downlink_proxy.py", line 29, in <module> > > > > import urllib.request, urllib.error, urllib.parse > > > > ImportError: No module named request > > > > > > > > > > > > This is correct for we are converting your scripts to use python3. I > > recommend this as I don't think PyQt5 exists for python2. (You > > apparently can build it yourself, but it's not very easy to > > accomplish.) > > > > > > > > > > > > If I run python3…………… > > > > Instead of python2……. > > > > I get: > > > > > > > > Traceback (most recent call last): > > > > File > > "/home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/mun > > _downlink_proxy.py", line 38, in <module> > > > > from core.data import server_data > > > > File > > "/home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/cor > > e/data.py", line 2, in <module> > > > > import Queue > > > > ModuleNotFoundError: No module named 'Queue' > > > > > > > > You will have to run 2to3 on all the scripts that get called from > mun_downlink_proxy.py. So run ... > > > > > > > > 2to3 -w > > /home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > Proxy/core > > /data.py > > > > > > > > This will change Queue to queue which will load under python3. > > > > > > > > 2to3 -w other_script_that_gets_called_from_mun_downlink_proxy.py > > > > > > > > Your original scripts will be saved with a .bak extension. Just rename them > if you don't like 2to3's changes. > > > > eg. > > > > > > > > mv mun_downlink_proxy.py.bak mun_downlink_proxy.py > > > > > > > > > > > > Thanks > > > > > > > > No problem. > > > > > > > > Take care and let me know where you get to next. > > > > > > > > Chris > > > > > > > > > > > > 73’s de Enzo IK8OZV > > EasyLog 5 BetaTester > > EasyLog PDA BetaTester > > WinBollet BetaTester > > D.C.I. CheckPoint Regione Campania > > Skype: ik8ozv8520 > > > > > > > > > > ********************************* > > > > ****** GSM +39 328 7110193 ****** > > > > ***** SMS +39 328 7110193 ***** > > > > ********************************* > > > > |
[Prev in Thread] | Current Thread | [Next in Thread] |