Strange Python 3 issue

Questions about programming languages and debugging
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Strange Python 3 issue

Post by ayu »

So I ran this code last night, and the day before that, and it worked perfectly.
Today when I ran it, I got this error.

Code: Select all

[+] Starting Ares
[+] Scanning ayu.alcor.se
[+] Searching for domains on 31.211.236.140 with YouGetSignal
[+] Searching for domains on 31.211.236.140 with Bing API
[+] Total domains found: 1 

blog.alcor.se

[+] Cleaning domain list from duplicates
[+] Scanning each site for known Content Management Systems
Traceback (most recent call last):
  File "PyCMSIdent/PyCMSIdent.py", line 5, in <module>
    from lib.test import Tests
  File "/home/cats/workspace/Ares/PyCMSIdent/lib/test.py", line 1, in <module>
    from lib.connect import Connect
  File "/home/cats/workspace/Ares/PyCMSIdent/lib/connect.py", line 6, in <module>
    import html.parser
ImportError: No module named html.parser

Process finished with exit code 0
The code in question are the imports at the top of one of my project files

Code: Select all

import pycurl
import io
import re
import html.parser
from urllib import parse
from lib.config import Config
This code worked yesterday, and PyCharm doesn't complain until I run it.

Any ideas?
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Strange Python 3 issue

Post by bad_brain »

what OS, and any updates applied lately? :-k
Image

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Strange Python 3 issue

Post by ayu »

Linux, XUbuntu.
And yeah updates applied a few days ago I think, can't remember when though.
Talking with mabs over jabber at the moment about the issue, and it's truly puzzling ^^
"The best place to hide a tree, is in a forest"

scatter
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 366
Joined: 01 Jan 2014, 05:22
10

Re: Strange Python 3 issue

Post by scatter »

well I don t know anything yet about python but I had same problem with a python script, it used to run work fine but after updates it workds for a minute and then stops with an error I think that s because of updates so you are not alone in such situation :p

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Strange Python 3 issue

Post by ayu »

Thanks a bunch for the answers, and thanks a bunch to Mabs for placing some of his time in trying to solve it for me.
I managed to solve it during lunch though.

I execute subscripts with "subprocess.call("python script.py")", and that will execute python 2, even if I add an alias to python 3.
So changing it to this helps:

Code: Select all

subprocess.call("python3 script.py")
"The best place to hide a tree, is in a forest"

Post Reply