zoneinfo data corrupt, how do I compile new data?

ぃ、小莉子 提交于 2020-01-06 08:14:15

问题


Basically the same thing happened again as when I asked this question. However this time I cannot get it right again. I tried the answer of Burhan Khalid again and I get the same errors again. I also tried copy pasting the zoneinfo folder from a backup again, but this time it did not fix my errors.

Version of Django = 1.4.5

Version of Celery = 3.0.8

Version of Django-Celery = 3.0.6

Version of pytz = 2013b (same as the files I am downloading)

OS = Mac Mountain Lion


Attempt 1:

  1. Clear the zoneinfo folder (/usr/share/zoneinfo/)
  2. Paste the tar gz file in the folder (tzdata2013b.tar.gz)
  3. Extract tar gz file using command provided by Burhan Khalid
  4. Create the script provided by Burhan Khalid
  5. Run the script

Result:

ValueError: Incorrect timezone setting: Europe/Amsterdam when trying to run celery beat.

When i check there is indeed no folder named Europ in the zoneinfo folder where there was one before


Attempt 2:

  1. Do not clear zoneinfo folder (I put it back from a backup I made before attempting above)
  2. Paste the tar gz file in the folder (tzdata2013b.tar.gz)
  3. Extract tar gz file using command provided by Burhan Khalid
  4. Create the script provided by Burhan Khalid in the zoneinfo folder
  5. Run the script

Result 2:

At step 3 I get the following output, including some errors:

[13:59:07] /usr/share/zoneinfo $ tar xvzf tzdata2013b.tar.gz
x Makefile
x africa: Can't remove already-existing dir
x antarctica: Can't remove already-existing dir
x asia: Can't remove already-existing dir
x australasia
x europe: Can't remove already-existing dir
x northamerica
x southamerica
x pacificnew
x etcetera
x backward
x systemv
x factory
x solar87
x solar88
x solar89
x iso3166.tab
x zone.tab
x leapseconds
x yearistype.sh tar: Error exit
delayed from previous errors.

At step 5 I get the following output, including some errors:

[13:59:13] /usr/share/zoneinfo $ sudo ./the_script.sh
Password:
zic: error reading africa
zic: error reading antarctica
zic: error reading asia
zic: error reading europe

And I still have the corrupt file.


Attempt 3:

  1. Restore the backup zoneinfo folder again
  2. Create seperate folder on Desktop
  3. Paste the tar gz file and the script in the new folder on the desktop
  4. Extract the tar gz file using the command
  5. Execute the script

Result 3:

Step 3 and 5 give no errors or unusual output

Trying to run celery beat still gives corrupt file error


Question What am I doing wrong here. I cannot seem to figure this out...


EDIT

So I have done some more digging around and found the following:

  1. If I run the same command via foreman run instead of via the Procfile I get no error, even when it is the only command in the Procfile
  2. Bad file descriptor error means that Python tries to close a file that is already closed instead of the file being corrupt

Which leads me to the conclusion that something in foreman while using a Procfile forces the file to close before it is closed correctly... Thoughts?

来源:https://stackoverflow.com/questions/17746065/zoneinfo-data-corrupt-how-do-i-compile-new-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!