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

compatibility with raspberry Debian Buster #52

Open
sasagr opened this issue Jul 13, 2020 · 8 comments
Open

compatibility with raspberry Debian Buster #52

sasagr opened this issue Jul 13, 2020 · 8 comments

Comments

@sasagr
Copy link

sasagr commented Jul 13, 2020

I tried to build it in the raspberry pi4 and got the following message during pulling dbpolitepol...

no matching manifest for linux/arm/v7 in the manifest list entries

did u plan to add compatibility to raspberry architecture?

@sasagr
Copy link
Author

sasagr commented Jul 18, 2020

I managed to install it on my raspberry pi 4 but not with the docker, since arm7 architecture is not in manifest.
To be able to install it I needed to remove all specified versions of all packages in order to be able to install latest ones.
Needed to replace mysql packages with mariadb and install nodes and npm differently. Eventually installation was ok, managed to started servers and launch localhost:80. Added URL, selected Title and Description, but when it comes to create the feed I get the feed link but instead of the preview I have:
Something wrong. Reload the page or contact us by email...
From the server log I see:
File "/home/pi/pol/pol/server.py", line 347, in render_GET
res = self.feed.getFeedData(feed_id)
File "/home/pi/pol/pol/feed.py", line 153, in getFeedData
with closing(get_conn(self.db_creds, dict_result=True)) as conn, conn as cur:
exceptions.AttributeError: exit

At this point I don't know what else to do.
Pls advise

@taroved
Copy link
Owner

taroved commented Jul 18, 2020

I didn't see such exception before. So I don't have raspberry pi4 and I can't reproduce and fix it

@sasagr
Copy link
Author

sasagr commented Jul 18, 2020

Oh. That’s a pity. If there is something that I can do to assist you, maybe some troubleshooting pls let me know. I really would like to make it working.
Otherwise what about the container compatibility with arm7v architecture? Would it make things easier?

@taroved
Copy link
Owner

taroved commented Jul 18, 2020

Sorry. I have no idea. You can try to debug code with import pdb; pdb.set_trace() but if you have experience in python language

@sasagr
Copy link
Author

sasagr commented Jul 18, 2020

I would not really know where to put the import pdb; pdb.set_trace(). I tried in feed.py a few lines before line 153 but I did not see prompting during the execution as you can see below.
Unfortunately I m not python coder. If you have any suggestion where to put it and eventually what to look for? Which command to give to pdb, pls let me know, otherwise I understand and I thanks you anyway.
Below the error I see in terminal windows where I executed the downloader.py. manage.py runserver is running in an another terminal window and I don't see any error there.

pi@raspberrypi:~/pol $ python downloader.py
2020-07-18T20:33:18+0300 [-] Site starting on 1234
2020-07-18T20:33:18+0300 [twisted.web.server.Site#info] Starting factory <twisted.web.server.Site instance at 0xb6b153c8>
Request <GET https://www.agriculture.com/markets/newswire> started
2020-07-18T20:35:15+0300 [twisted.web.client._HTTP11ClientFactory#info] Starting factory _HTTP11ClientFactory(<function quiescentCallback at 0xb2ddcc30>, <twisted.internet.endpoints._WrapperEndpoint object at 0xb2dd9c50>)
Response https://www.agriculture.com/markets/newswire ready (100480 bytes)
2020-07-18T20:35:15+0300 [twisted.python.log#info] "127.0.0.1" - - [18/Jul/2020:17:35:14 +0000] "GET /downloader?url=https%3A%2F%2Fwww.agriculture.com%2Fmarkets%2Fnewswire HTTP/1.0" 200 134049 "http://192.168.1.99/en/setup?url=https%3A//www.agriculture.com/markets/newswire" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15"
2020-07-18T20:35:15+0300 [twisted.web.client._HTTP11ClientFactory#info] Stopping factory _HTTP11ClientFactory(<function quiescentCallback at 0xb2ddcc30>, <twisted.internet.endpoints._WrapperEndpoint object at 0xb2dd9c50>)
2020-07-18T20:36:08+0300 [twisted.web.server.Request#critical]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 572, in dataReceived
why = self.lineReceived(line)
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 2155, in lineReceived
self.allContentReceived()
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 2284, in allContentReceived
req.requestReceived(command, path, version)
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 946, in requestReceived
self.process()
--- ---
File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 235, in process
self.render(resrc)
File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 302, in render
body = resrc.render(self)
File "/usr/local/lib/python2.7/dist-packages/twisted/web/resource.py", line 265, in render
return m(request)
File "/home/pi/pol/pol/server.py", line 347, in render_GET
res = self.feed.getFeedData(feed_id)
File "/home/pi/pol/pol/feed.py", line 155, in getFeedData
with closing(get_conn(self.db_creds, dict_result=True)) as conn, conn as cur:
exceptions.AttributeError: exit

@sasagr
Copy link
Author

sasagr commented Jul 20, 2020

Hi there... I tried a new installation on rpi3 with ubuntu 18.04 and not debian this time.
Managed also here to get all installed and running but also here I get the same exception error.
I check around and it seems that maybe some lib for raspberry do not support the "with.." properly.
I tried to edit this part of code replacing the "with..." with
conn = closing(get_conn(self.db_creds, dict_result=True))
cur = conn
cur.execute("""select f.uri, f.xpath....

fixing the indentation but I get another error:
cur.execute("""select f.uri, f.xpath as feed_xpath, fi.name, ff.xpath, fi.required
exceptions.AttributeError: 'closing' object has no attribute 'execute'

so obviously I m doing something very wrong.
Can you suggest some alternative lines in this part of code that maybe they will by pass the initial issue?

@taroved
Copy link
Owner

taroved commented Jul 22, 2020

Sorry. But currently, I have no enough. I will back to the issue but I don't know when

@Wombat2018
Copy link

I would like to respond this topic again. It would be really great if a version linux/arm/v7 would be provided to use it on the Raspberry Pi 4 with docker.

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