This question has been flagged
5 Replies
5914 Views

Hi All:

I have a problem in installing the Forum Module in Odoo 11 CE, an error throw up as stated below, what is the problem? how can I install the Forum Module?


Information about the installation:

  • Windows 10 64x

  • Odoo 11 Community Edition - Windows Edition

  • All of other Modules are successfully installed.


Thanks in advance


The error is :


Error:

Odoo Server Error

Traceback (most recent call last):

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\convert.py", line 741, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\convert.py", line 651, in _tag_record

    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\base\ir\ir_model.py", line 1467, in _update

    record = record.create(values)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\website_forum\models\forum.py", line 154, in create

    return super(Forum, self.with_context(mail_create_nolog=True, mail_create_nosubscribe=True)).create(values)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\mail\models\mail_thread.py", line 231, in create

    thread = super(MailThread, self).create(values)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 3258, in create

    vals = self._add_missing_default_values(vals)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 1532, in _add_missing_default_values

    defaults = self.default_get(list(missing_defaults))

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 1013, in default_get

    defaults[name] = field.default(self)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\website_forum\models\forum.py", line 43, in _get_default_faq

    return f.read()

  File "C:\Program Files (x86)\Odoo 11.0\python\lib\encodings\cp1252.py", line 23, in decode

    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1397: character maps to <undefined>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 646, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 307, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\pycompat.py", line 86, in reraise

    raise value

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 683, in dispatch

    result = self._call_function(**self.params)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 339, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\service\model.py", line 97, in wrapper

    return f(dbname, *args, **kwargs)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 332, in checked_call

    result = self.endpoint(*a, **kw)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 927, in __call__

    return self.method(*args, **kw)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 512, in response_wrap

    response = f(*args, **kw)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\web\controllers\main.py", line 920, in call_button

    action = self._call_kw(model, method, args, {})

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\web\controllers\main.py", line 908, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\api.py", line 689, in call_kw

    return call_kw_multi(method, model, args, kwargs)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\api.py", line 680, in call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-39>", line 2, in button_immediate_install

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\base\module\module.py", line 70, in check_and_log

    return method(self, *args, **kwargs)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\base\module\module.py", line 437, in button_immediate_install

    return self._button_immediate_function(type(self).button_install)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\base\module\module.py", line 530, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\modules\registry.py", line 84, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\modules\loading.py", line 343, in load_modules

    loaded_modules, update_module)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\modules\loading.py", line 242, in load_marked_modules

    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\modules\loading.py", line 156, in load_module_graph

    _load_data(cr, module_name, idref, mode, kind='data')

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\modules\loading.py", line 94, in _load_data

    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\convert.py", line 788, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\convert.py", line 849, in convert_xml_import

    obj.parse(doc.getroot(), mode=mode)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\convert.py", line 738, in parse

    self.parse(rec, mode)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\convert.py", line 748, in parse

    exc_info[2]

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\pycompat.py", line 85, in reraise

    raise value.with_traceback(tb)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\convert.py", line 741, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\convert.py", line 651, in _tag_record

    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\base\ir\ir_model.py", line 1467, in _update

    record = record.create(values)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\website_forum\models\forum.py", line 154, in create

    return super(Forum, self.with_context(mail_create_nolog=True, mail_create_nosubscribe=True)).create(values)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\mail\models\mail_thread.py", line 231, in create

    thread = super(MailThread, self).create(values)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 3258, in create

    vals = self._add_missing_default_values(vals)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 1532, in _add_missing_default_values

    defaults = self.default_get(list(missing_defaults))

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 1013, in default_get

    defaults[name] = field.default(self)

  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\website_forum\models\forum.py", line 43, in _get_default_faq

    return f.read()

  File "C:\Program Files (x86)\Odoo 11.0\python\lib\encodings\cp1252.py", line 23, in decode

    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

odoo.tools.convert.ParseError: "charmap

<h1>Guidelines</h1>

<h2><a class="faq-question">What kinds of questions can I ask here?</a></h2>

<p>

    This community is for professional and enthusiast users,

    partners and programmers. You can ask questions about:

</p>

<ul>

    <li>how to install Odoo on a specific infrastructure,</li>

    <li>how to configure or customize Odoo to specific business needs,</li>

    <li>what's the best way to use Odoo for a specific business need,</li>

    <li>how to develop modules for your own need,</li>

    <li>specific questions about Odoo service offers, etc.</li>

</ul>

<p>

    <b>Before you ask - please make sure to search for a similar question.</b> You can

    search questions by their title or tags. It’s also OK to

    answer your own question.

</p><p>

    <b>Please avoid asking questions that are too subjective

    and argumentative</b> or not relevant to this community.

</p>

<h2><a class="faq-question">What should I avoid in my questions?</a></h2>

<p>

    You should only ask practical, answerable questions based

    on actual problems that you face. Chatty, open-ended

    questions diminish the usefulness of this site and push

    other questions off the front page.

</p><p>

    To prevent your question from being flagged and possibly removed, avoid asking

    subjective questions where …

</p>

<ul>

    <li>every answer is equally valid: “What’s your favorite ______?”</li>

    <li>your answer is provided along with the question, and you expect more answers: “I use ______ for ______, what do you use?”</li>

    <li>there is no actual problem to be solved: “I’m curious if other people feel like I do.”</li>

    <li>we are being asked an open-ended, hypothetical question: “What if ______ happened?”</li>

    <li>it is a rant disguised as a question: “______ sucks, am I right?”</li>

</ul>

<p>

    If you fit in one of these example or if your motivation for asking the

    question is “I would like to participate in a discussion about ______”, then

    you should not be asking here but on our mailing lists.

    However, if your motivation is “I would like others to explain ______ to me”,

    then you are probably OK.

</p><p>

    (The above section was adapted from Stackoverflow’s FAQ.)

</p><p>

    More over:

</p>

<ul>

    <li><b>Answers should not add or expand questions</b>. Instead either edit the question or add a question comment.</li>

    <li><b>Answers should not comment other answers</b>. Instead add a comment on the other answers.</li>

    <li><b>Answers shouldn't just point to other Questions</b>. Instead add a question comment indication "Possible duplicate of...". However, it's ok to include links to other questions or answers providing relevant additional information.</li>

    <li><b>Answers shouldn't just provide a link a solution</b>. Instead provide the solution description text in your answer, even if it's just a copy/paste. Links are welcome, but should be complementary to answer, referring sources or additional reading.</li>

</ul>

<h2><a class="faq-question">What should I avoid in my answers?</a></h2>

<p>

    <b>Answers should not add or expand questions</b>. Instead

    either edit the question or add a comment.

</p><p>

    <b>Answers should not comment other answers</b>. Instead

    add a comment on the other answers.

</p><p>

    <b>Answers shouldn't just point to other questions</b>.

    Instead add a comment indicating <i>"Possible duplicate

    of..."</i>. However, it's fine to include links to other

    questions or answers providing relevant additional

    information. </p> <p> <b>Answers shouldn't just provide a

    link a solution</b>. Instead provide the solution

    description text in your answer, even if it's just a

    copy/paste. Links are welcome, but should be complementary to

    answer, referring sources or additional reading.

</p><p>

    <b>Answers should not start debates</b>

    This community Q&amp;A is not a discussion group. Please avoid holding debates in

    your answers as they tend to dilute the essence of questions and answers. For

    brief discussions please use commenting facility.

</p> <p>

    When a question or answer is upvoted, the user who posted them will gain some

    points, which are called "karma points". These points serve as a rough

    measure of the community trust to him/her. Various moderation tasks are

    gradually assigned to the users based on those points.

</p> <p>

    For example, if you ask an interesting question or give a helpful answer, your

    input will be upvoted. On the other hand if the answer is misleading - it will

    be downvoted. Each vote in favor will generate 10 points, each vote against

    will subtract 10 points. There is a limit of 200 points that can be accumulated

    for a question or answer per day. The table given at the end explains reputation point

    requirements for each type of moderation task.

</p>

<h2><a class="faq-question">Why can other people edit my questions/answers?</a></h2>

<p>

    The goal of this site is create a relevant knowledge base that would answer

    questions related to Odoo.

</p><p>

    Therefore questions and answers can be edited like wiki pages by experienced users of

    this site in order to improve the overall quality of the knowledge base content.

    Such privileges are granted based on user karma level: you will be able to do the same

    once your karma gets high enough.

</p><p>

    If this approach is not for you, please respect the community and use Google+

    communities instead.

</p>

1397 1398 character maps to <undefined>" while parsing file:/c:/program files (x86)/odoo 11.0/server/odoo/addons/website_forum/data/forum_data.xml:4, near

<record id="forum_help" model="forum.forum">

            <field name="name">Help</field>

        </record>



Avatar
Discard

Right now there we can find a lot of issues in v11CE, please try to post the issues in git. Also keep the V11 updated to latest one as the bug fix is going on

Author

Thank you.

Author Best Answer

Thanks for all.


This issue has been resolved after reporting the case in Github, user named (ongood) reply with the following solution:

Please put the forum.py code for 42 lines
with open(fname, 'r') as f:
change into
with open(fname, 'rb') as f:

Thanks for him

Avatar
Discard
Best Answer

It may cause due to misplacement of tags. Review your code

Avatar
Discard
Author

Thank you for your kind reply.

But I don't have any customized code, it is pure Odoo 11 CE.