Glad you got it working =)

If you figure anything more out and can demonstrate the error let us know
(or even submit a pull request to the wordpress importer), we are always
looking to improve!


On Thu, May 14, 2015 at 12:34 PM, Jonathan Sandoval <[email protected]>
wrote:

> Ohh, the new problem is related to a print because of the verbosity. It
> was going to print the new category, but it has a "acute accent" (I think
> it's the right translation for tilde). I set the verbosity level to 0 and
> it worked.
>
> Anyway, I had other problems with spanish accents if I introduced them
> while importing. Anyway, I ignored them for now.
>
>
> El jueves, 14 de mayo de 2015, 11:29:52 (UTC-5), Jonathan Sandoval
> escribió:
>>
>> Many thanks Josh. I modified the code directly and it [almost worked].
>> Now I'm getting the following exception:
>>
>> Traceback (most recent call last):
>>   File "manage.py", line 28, in <module>
>>     execute_from_command_line(sys.argv)
>>   File
>> "/home/ark/corriente/venv/lib/python3.4/site-packages/django/core/management/__init__.py"
>> , line 399, in execute_from_command_line
>>     utility.execute()
>>   File
>> "/home/ark/corriente/venv/lib/python3.4/site-packages/django/core/management/__init__.py"
>> , line 392, in execute
>>     self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File
>> "/home/ark/corriente/venv/lib/python3.4/site-packages/django/core/management/base.py"
>> , line 242, in run_from_argv
>>     self.execute(*args, **options.__dict__)
>>   File
>> "/home/ark/corriente/venv/lib/python3.4/site-packages/django/core/management/base.py"
>> , line 285, in execute
>>     output = self.handle(*args, **options)
>>   File
>> "/home/ark/corriente/venv/lib/python3.4/site-packages/mezzanine/blog/management/base.py"
>> , line 190, in handle
>>     print("Imported category: %s" % cat)
>> UnicodeEncodeError: 'ascii' codec can't encode character '\xed' in
>> position 30: ordinal not in range(128)
>>
>> Anyway, I'll try to compare with the new version of the file to see if
>> it's already fixed. I think the problem is related to spanish characters,
>> because the wordpress posts, categories and tags are written in spanish.
>>
>> Again, many thanks.
>>
>> El jueves, 14 de mayo de 2015, 10:55:33 (UTC-5), Josh Cartmell escribió:
>>>
>>> Hi Jonathan, I don't think it's made it onto pypi yet, but the way that
>>> pub_date is converted for use in Mezzanine was updated fairly recently
>>> because of changes in Wordpress' export XML.  Take a look at it now:
>>>
>>> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/management/commands/import_wordpress.py#L63
>>>
>>> Since this change will be making it into Mezzanine with the next release
>>> I think it would be safe to replace the old version with the new one,
>>> directly in your copy of Mezzanine.  If you ever upgrade you will get the
>>> new version anyways so I think this is one case where directly modifying
>>> Mezzanine would be ok.
>>>
>>> Good luck!
>>>
>>> On Thu, May 14, 2015 at 11:28 AM, Jonathan Sandoval <[email protected]
>>> > wrote:
>>>
>>>> Hi.
>>>> I want to migrate from wordpress 3.9.6 to mezzanine. I just installed
>>>> mezzanine and I exported the wordpress posts and pages and, when trying to
>>>> import the xml I get the following error:
>>>>
>>>> /home/ark/corriente/venv/lib/python3.4/site-packages/mezzanine/utils/
>>>> conf.py:52: UserWarning: You haven't defined the ALLOWED_HOSTS
>>>> settings, which Django 1.5 requires. Will fall back to the domains
>>>> configured as sites.
>>>>   warn("You haven't defined the ALLOWED_HOSTS settings, which "
>>>> /home/ark/corriente/venv/lib/python3.4/site-packages/mezzanine/utils/conf.py:60:
>>>> UserWarning: TIME_ZONE setting is not set, using closest match: US/Eastern
>>>>   warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
>>>> /home/ark/corriente/venv/lib/python3.4/site-packages/feedparser.py:346:
>>>> DeprecationWarning: To avoid breaking existing software while fixing issue
>>>> 310, a temporary mapping has been created from `updated_parsed` to
>>>> `published_parsed` if `updated_parsed` doesn't exist. This fallback will be
>>>> removed in a future version of feedparser.
>>>>   DeprecationWarning)
>>>>
>>>> Traceback (most recent call last):
>>>>   File "manage.py", line 28, in <module>
>>>>     execute_from_command_line(sys.argv)
>>>>   File "/home/ark/corriente/venv/lib/python3.4/site-packages/django/
>>>> core/management/__init__.py", line 399, in execute_from_command_line
>>>>     utility.execute()
>>>>   File "/home/ark/corriente/venv/lib/python3.4/site-packages/django/
>>>> core/management/__init__.py", line 392, in execute
>>>>     self.fetch_command(subcommand).run_from_argv(self.argv)
>>>>   File "/home/ark/corriente/venv/lib/python3.4/site-packages/django/
>>>> core/management/base.py", line 242, in run_from_argv
>>>>     self.execute(*args, **options.__dict__)
>>>>   File "/home/ark/corriente/venv/lib/python3.4/site-packages/django/
>>>> core/management/base.py", line 285, in execute
>>>>     output = self.handle(*args, **options)
>>>>   File "/home/ark/corriente/venv/lib/python3.4/site-packages/mezzanine/
>>>> blog/management/base.py", line 167, in handle
>>>>     self.handle_import(options)
>>>>   File "/home/ark/corriente/venv/lib/python3.4/site-packages/mezzanine/
>>>> blog/management/commands/import_wordpress.py", line 64, in
>>>> handle_import
>>>>     pub_date = datetime.fromtimestamp(mktime(pub_date))
>>>> TypeError: Tuple or struct_time argument required
>>>>
>>>>
>>>> Thanks for any help provided.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Mezzanine Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to