在python AccessInit中是什么意思:哈希冲突:1和1均为3? [英] What does it mean in python AccessInit: hash collision: 3 for both 1 and 1?

查看:76
本文介绍了在python AccessInit中是什么意思:哈希冲突:1和1均为3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个python文件.从PHP运行第一个调用其他文件的python文件,但出现此错误:

I have 4 python files. From PHP i run the first python file that call the others, but i got this error:

AccessInit: hash collision: 3 for both 1 and 1 

这是什么意思?

这里,谈论以不同方式调用的同一模块,有可能吗?

Here, talks about the same module called in different way, it is possible?

# Import this carefully
try:
    import Image, ImageDraw, ImageFont
    pil_available = True


from PIL import Image, ...

我检查了导入模块",但没有找到其他导入

I checked my "import module" i don't have found a different importation

这些是我导入的模块:

import os
import glob
import scipy
import numpy as np
import pymorph as pm
#import pylab as plb
import os
import math
#from matplotlib import pyplot as plt
import cv2
import mahotas as mh
from skimage import morphology

推荐答案

The link provided by Airswoop1 provides one approach, but there's actually an even easier solution given in the comments. I simply added this at the top of my script:

import sys
import PIL.Image
sys.modules['Image'] = PIL.Image

该评论的作者建议将其放在您项目的settings.py中,但我没有,所以没有必要.

The author of the comment suggests putting it in your project's settings.py, but I don't have one, and it turned out not to be necessary.

这篇关于在python AccessInit中是什么意思:哈希冲突:1和1均为3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆