llSourcell / Convolutional_neural_network

This is the code for "Convolutional Neural Networks - The Math of Intelligence (Week 4)" By Siraj Raval on Youtube
369 stars 294 forks source link

Getting Errors with bad magic number in 'app.model': b'\x03\xf3\r\n' #6

Open nitinseven opened 6 years ago

nitinseven commented 6 years ago

ImportError Traceback (most recent call last)

in () 1 import pickle #saving and loading our serialized model 2 import numpy as np #matrix math ----> 3 from app.model.preprocessor import Preprocessor as img_prep #image preprocessing 4 5 #class for loading our saved model and classifying new images C:\Users\DELL\Convolutional_neural_network-master\app\__init__.py in () 6 app.config.from_object('config') 7 ----> 8 from app import views C:\Users\DELL\Convolutional_neural_network-master\app\views.py in () 1 from flask import render_template, flash, redirect, request, jsonify 2 from app import app ----> 3 from app.model.preprocessor import Preprocessor as img_prep 4 from app.model.alpha_cnn_predict import LiteOCR 5 import json ImportError: **bad magic number in 'app.model': b'\x03\xf3\r\n'**
vishalseshagiri commented 6 years ago

The config module seems to be missing. Getting the same error.

akraimit commented 6 years ago

getting the same error. can anyone help it out?

123survesh commented 6 years ago

Hey guys, the .pyc files were causing this error. Try deleting the .pyc files from your repos. https://tutorials.technology/solved_errors/13-ImportError-bad-magic-number-in-x03-xf3.html

I deleted the .pyc files and now the code works :+1:

ece8264 commented 5 years ago

h

Hey guys, the .pyc files were causing this error. Try deleting the .pyc files from your repos. https://tutorials.technology/solved_errors/13-ImportError-bad-magic-number-in-x03-xf3.html

I deleted the .pyc files and now the code works +1

hey! trying to solve the problem and run it on google collab ... big challenge as i am a beginer to both python and google collab , you mean to transform all .pyc files to .py ? or just delete them all?

OO7kartik commented 4 years ago

first, remove the .pyc file

steps

1. find . -name \*.pyc -delete
2. pip install config

https://github.com/Miserlou/Zappa/issues/854