bq / web2board

Native program that connects a web and a board. It compiles Arduino sketches and uploads them onto an Arduino board.
GNU Lesser General Public License v3.0
11 stars 11 forks source link

IOError: [Errno 32] Broken pipe Running web2boardLink #3

Open adumont opened 7 years ago

adumont commented 7 years ago

While no board connected, if I run /opt/web2board/web2boardLink I get this:

web2board: no process found Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Version.py, line 16 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Config.py, line 73 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file MainApp.py, line 88 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Version.py, line 35 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Version.py, line 36 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Version.py, line 37 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file MainApp.py, line 156 Terminated adumont@denia:~$ /opt/web2board/web2boardLink web2board: no process found Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Version.py, line 16 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Config.py, line 73 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file MainApp.py, line 88 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Version.py, line 35 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Version.py, line 36 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file Version.py, line 37 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file MainApp.py, line 156 ^CTraceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file , line 71 Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 885, in emit self.flush() File "/usr/lib/python2.7/logging/init.py", line 845, in flush self.stream.flush() IOError: [Errno 32] Broken pipe Logged from file , line 75 Traceback (most recent call last): File "", line 296, in File "", line 289, in main [Ctrl-C] KeyboardInterrupt web2boardLink returned -1

Is it the expected behaviour? Should there be some window opening? I see none. I'm wondering if web2board is installed correctly. I'm just checking prior to getting a BQ robot at home (not yet arrived), but those errors scare me a bit. Maybe I'm missing some python dependency or something else?

I've got those Python packages installed (pip):

pip freeze

bottle==0.12.11 chardet==2.3.0 click==5.1 defer==1.0.6 duplicity==0.7.6 flexmock==0.10.2 futures==3.0.5 glob2==0.5 inflection==0.3.1 Ksplice-Uptrack==1.2.41 lockfile==0.12.2 psutil==3.4.2 pycurl==7.43.0 pygobject==3.20.0 PyInstaller==3.0 pyserial==3.2.1 pysqlite==2.7.0 python-apt==1.1.0b1 python-debian==0.1.27 pyxdg==0.25 PyYAML==3.11 requests==2.12.4 six==1.10.0 ws4py==0.3.5 wshubsapi==0.9.2 xmlrunner==1.7.7

dpkg -l web*

Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=============================-===================-===================-=============================================================== ii web2board 2.1.2 amd64 WEB2BOARD

I also git cloned the repo, ran the pip install -r , and when I get these:

adumont@denia:~/web2board$ python src/Scripts/ConstructRes.py adumont@denia:~/web2board$ python src/web2board.py Traceback (most recent call last): File "src/web2board.py", line 20, in from wshubsapi.hubs_inspector import HubsInspector File "/usr/local/lib/python2.7/dist-packages/wshubsapi/hubs_inspector.py", line 8, in from wshubsapi.client_file_generator.js_file_generator import JSClientFileGenerator File "/usr/local/lib/python2.7/dist-packages/wshubsapi/client_file_generator/js_file_generator.py", line 5, in from wshubsapi.serializer import Serializer File "/usr/local/lib/python2.7/dist-packages/wshubsapi/serializer.py", line 39 def __list_handler(self, obj: list, depth): ^ SyntaxError: invalid syntax

ANything wrong or is it normal error? (maybe because no board connected yet?) ANy idea? Can I add more detail in the issue to help?

Thanks in advance.

tocalvo commented 7 years ago

Hi, don't worry! this its a repository to build web2board and you don't need to build the program to use it, we have some installers for windows, mac and linux here : http://bitbloq.bq.com/#/howitworks

You can use an offline version of bitbloq to program the robot too (windows, mac and linux):http://bitbloq.bq.com/#/offline

If you have a chromebook you can use Bitbloq too.

So can you tell me if you want to install the program to use it , or if you want to build a new version of the program?

Of course if you want to modify the program to build your own web2board i can explain how to setup the environment.

If you install the program from "http://bitbloq.bq.com/#/howitworks" and get that error, can you tell me the Linux or Mac version of your computer? and if is a 32 or 64 version?

We will check it!

adumont commented 7 years ago

Hi, From my initial report, everything up to where I say "I also git cloned the repo..." is me trying the installed version (using the Linux 64bits installer), of, I guess, the online version, the one meant to be called from Chrome.

As I said, I get these error, and no window open, and I'm wondering if it is be normal, I don't know, I have never used it, and right now I have no board connected yet. I'm about to get a robot and I wanted to be prepared for when I get it. Are those error normal?

tocalvo commented 7 years ago

OK, i check it and there is no problem, web2board must start from the bitbloq website. this launch a socketserver to connect, if you try to launch it from the file, this error is normal because the program cant connect to the socket.

To test if the installation was successfully, try to compile a program on Bitbloq, when you push the verify button , web2board start and compile, if you try to upload to the board a "no board was detected" message will appear.

If everytime that you push the verify button, bitbloq said that you must install web2board, please tell me your linux distribution because can be a problem with the file that link the url protocol to launch web2board.

Thanks!

adumont commented 7 years ago

I tested as Guest from the online bitbloq, when I click on the Check button to check (an empty project), I get a window that says "/home/adumont/web2board:: No such file or directory".

That's weird, and I have no such directory anyway. I installed using the installer for linux. My LInux user as all sudo rights without password for now, so that shouldnt be the problem hopefully.

Also I see no web2board processes started.

I'm using Ubuntu 16.04.1 with Lubuntu desktop.

From my same user, I have this:

adumont@denia:~$ cat .local/share/applications/mimeapps.list [Default Applications] text/html=google-chrome-beta.desktop x-scheme-handler/http=google-chrome-beta.desktop x-scheme-handler/https=google-chrome-beta.desktop x-scheme-handler/about=google-chrome-beta.desktop x-scheme-handler/unknown=google-chrome-beta.desktop x-scheme-handler/mailto=google-chrome.desktop

[Added Associations] video/mp4=vlc.desktop; text/plain=gedit.desktop; application/x-shellscript=gedit.desktop;

custom handler for bitbloqs web2board:

x-scheme-handler/web2board=web2board-handler.desktop

END_WEB2BOARD_HANDLER

And it point to:

adumont@denia:~$ cat .local/share/applications/web2board-handler.desktop[Desktop Entry] Version=0.0.0 Type=Application Icon=/opt/web2board/web2board/res/Web2board.ico Exec=/opt/web2board/web2boardLink StartupNotify=true Terminal=false Categories=Utility;X-XFCE;X-Xfce-Toplevel MineType=x-scheme-handler/vnc Comment=Launch web2board Name=Web2board Launcher Name[en_US]=Web2board

THanks for your help, much appreciated.

adumont commented 7 years ago

forgot to add, after the "/home/adumont/web2board:: No such file or directory" error pops up (from Chrome, but out of the web page itself), a new dialog in Chrome asks me to "Download Web2Board to be able to program your board...", as if it were not installed. :(

tocalvo commented 7 years ago

really weird :S , the program think that the user logged is "edumont" and try to config in the user folder. But if the user folder don't exist web2board can't write the config and the exception stop the program.

The Chrome message its because the web launch web2board and if web2board don't connect, think that is not installed (we don't have another way to know if the application was installed).

Can you try to create the "/home/edumont" folder? and give permission to the user that launch the browser with Bitbloq to read and write?

Lets try first that you can use Bitbloq, and then find why the system give that username to web2board.

Its really weird because the username was given by the system. I see that in your terminal your username appear as "edumont@denia", used to be userName@machineName, do you have different name in your personal system folder than your username? or maybe the users folder are in another location?

In any moment you change the username in system or the folder location? its an ubuntu+lubuntu clean installation with an admin user without password?

Sorry about the problems :(, if the folder creation don't work, maybe using the online compilation will work, so the first is that you can have your laptop ready to use Bitbloq, and then we can have more time to try to duplicate the error on our testing computers to find a better solution.

adumont commented 7 years ago

The user is adumont (not edumont), and the machine name is Denia yes. The home of the user is /home/adumont and it exists. Yes it is a clean Ubuntu install with lubuntu. There is no /home/adumont/web2board:: (notice the two :: in the error). I believe the Web 2 board files are installed in /opt/web2board and some others in /home/adumont/.web2board (with a leading dot).

adumont commented 7 years ago

Is there any flag or option I could add to the web2board-handler.desktop so it will log traces to a log file, maybe a debug/trace option?

tocalvo commented 7 years ago

sorry about the mistake on your username, im searching why the program can't get the correct path.

Web2board should write a log file in /home/adumont/.web2boardLink.log , and if web2boardLink can open the web2board process then another log file will be in /home/adumont/.web2board/info.log

Can you paste the content of both files?

And, sorry i know that its not the solution, but, can you try the online compilation option? this option compile in our server and load to the board through a chrome extension (no web2board needed).

You need to register and set the option in your profile. To access to your profile click on your user image in the top navbar:

screen shot 2016-12-21 at 12 24 30 screen shot 2016-12-21 at 12 24 39

Im searching the bug, and i think that, its better than you can use Bitbloq until i find the solution.

Just to confirm, you use lubuntu 16.04? from http://lubuntu.net/ ? i cant reproduce the error on our ubuntu computers so im going to install a virtual machine to try to reproduce the bug, will be easy to found. Thanks!

Sorry again about the inconvenience.