python3.3.5运行报can't assign to fuunction call,咋回事?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python3.3.5运行报can't assign to fuunction call,咋回事?相关的知识,希望对你有一定的参考价值。

参考技术A

python3.3.5运行报can't assign to fuunction call出现这个的原因以及解决的方法如下:

1、电脑上面可以带有相关的病毒。需要使用杀毒软件对电脑进行病毒查杀。

2、电脑硬件老化,配置较低,已经担负不起多任务的处理。在条件运行的状况下更换一台配置好一点电脑就可以有效解决出现卡死的问题。

3、电脑上面缓存的垃圾文件较多。可以使用杀毒软件对电脑里面进行垃圾清理。

4、关闭和卸载电脑上面不常使用到的软件。多任务处理会增加CPU的负荷,可以关闭和卸载一些没有使用到的软件来减轻电脑的运行负荷。

5、电脑本身的硬件出现故障。使用检测软件检测硬盘是否出现坏道,电脑是否出现什么异常的声音。

python2.7安装etuptools-36.6.0报ascii' codec can't decode byte 0xce in position 7问题

解决办法1

原文链接:http://blog.csdn.net/all_over_servlet/article/details/45112221

修改编码为gbk,修改D:\\Python27\\Lib\\ntpath.py(位置由个人python安装目录决定)文件中的def join(path, *paths)函数,在函数内第一行加入

reload(sys)  
sys.setdefaultencoding(‘gbk‘)  

即:

# Join two (or more) paths.  
def join(path, *paths):  
    """Join two or more pathname components, inserting "\\\\" as needed."""  
   reload(sys)  
   sys.setdefaultencoding(‘gbk‘)  
    result_drive, result_path = splitdrive(path)  
    for p in paths:  
        p_drive, p_path = splitdrive(p)  
        if p_path and p_path[0] in \\\\/:  
            # Second path is absolute  
            if p_drive or not result_drive:  
                result_drive = p_drive  
            result_path = p_path  
            continue  
        elif p_drive and p_drive != result_drive:  
            if p_drive.lower() != result_drive.lower():  
                # Different drives => ignore the first path entirely  
                result_drive = p_drive  
                result_path = p_path  
                continue  
            # Same drive in different case  
            result_drive = p_drive  
        # Second path is relative to the first  
        if result_path and result_path[-1] not in \\\\/:  
            result_path = result_path + \\\\  
        result_path = result_path + p_path  
    ## add separator between UNC and non-absolute path  
    if (result_path and result_path[0] not in \\\\/ and  
        result_drive and result_drive[-1:] != :):  
        return result_drive + sep + result_path  
    return result_drive + result_path  

 

 

解决办法2:(PS:这是网上最多解答的帖子,不一定能够解决,楼主自己是依照解决方法1解决了问题)

技术分享

 

注意Python语法缩进原则。

以上是关于python3.3.5运行报can't assign to fuunction call,咋回事?的主要内容,如果未能解决你的问题,请参考以下文章

Django加载模版报错 'utf8' codec can't decode byte

Python读取txt文件报错:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 0(示

往jdk/bin目录中增加tcnative-1.dll文件以后报错 Can't load AMD 64-bit .dll on a IA 32-bit platform

解决python编码问题报错:'ascii' codec can't encode characters in position 0-15: ordinal not in ra

python 网络爬虫报错“UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position”解决方案(

[python3 - TroubleShooting] UnicodeEncodeError: 'gbk' codec can't encode character '