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,220 points
1,122 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,130 points

Related Questions In Selenium

0 votes
1 answer

Selenium WebDriver Error: AttributeError: 'list' object has no attribute 'click'

The error is because your using driver.find_elements ...READ MORE

answered Jun 8, 2018 in Selenium by king_kenny
• 3,650 points
2,888 views
0 votes
1 answer

TestNG error:- Cannot find class in classpath

The issue is because the project directory ...READ MORE

answered Mar 23, 2018 in Selenium by nsv999
• 5,090 points
6,818 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,090 points
432 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,090 points
548 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,130 points
881 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,130 points
546 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,130 points
95 views
0 votes
1 answer