Error: No module named 'chardet'

0 votes

I have created an exe using cx_Freeze. The build was successful. Then when I was clicking on the exe, I got: -

no module named 'queue'

and added the below line:-

from multiprocessing import Queue

Then above is showing this:

no module named 'chardet'. 

And below is the complete error

Traceback (most recent call last):

  File "C:\Users\pc\AppData\Local\Programs\Python\Python36-32\lib\site-pac

kages\cx_Freeze\initscripts\__startup__.py", line 14, in run

    module.run()

  File "C:\Users\pc\AppData\Local\Programs\Python\Python36-32\lib\site-pac

kages\cx_Freeze\initscripts\Console.py", line 26, in run

    exec(code, m.__dict__)

  File "normalapi_2103.py", line 1, in <module>

  File "C:\Users\pc\AppData\Local\Programs\Python\Python36-32\lib\site-pac

kages\requests-2.18.4-py3.6.egg\requests\__init__.py", line 44, in <module>

    import chardet

ModuleNotFoundError: No module named 'chardet'

I also tried adding

'requests' and 'os' packages in setup.py.

Jul 6, 2018 in Selenium by Martin
• 4,330 points
1,727 views

1 answer to this question.

0 votes

This should just be a question of adding chardet to includes command.

build_exe_options = {"includes":["chardet"]}

See the build_exe options.

answered Jul 6, 2018 by Samarpit
• 5,890 points

Related Questions In Selenium

0 votes
2 answers
+2 votes
1 answer

Error occurred during initialization of boot layer java.lang.module.FindException: Module Selenium not found

This might probably be coz while creating ...READ MORE

answered Nov 27, 2019 in Selenium by Sirajul
• 54,090 points
5,764 views
0 votes
2 answers

TestNG error:- Cannot find class in classpath

The above link didn't work it means ...READ MORE

answered Feb 12 in Selenium by Rashmi Reddy PR
15,580 views
+1 vote
1 answer

Nightwatch chromedriver error

You should use a dot before lib: "webdriver.chrome.driver" ...READ MORE

answered Mar 25, 2018 in Selenium by nsv999
• 5,510 points
1,010 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
2,886 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,231 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,890 points
2,351 views
0 votes
1 answer

isDisplayed Error: No element found using locator instead of boolean

You should check whether an element is ...READ MORE

answered Jul 18, 2018 in Selenium by Samarpit
• 5,890 points
372 views
0 votes
1 answer