Convolutional_neural_network icon indicating copy to clipboard operation
Convolutional_neural_network copied to clipboard

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

Open nitinseven opened this issue 7 years ago • 5 comments

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'

nitinseven avatar Oct 27 '17 06:10 nitinseven

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

vishalseshagiri avatar Nov 03 '17 08:11 vishalseshagiri

getting the same error. can anyone help it out?

akraimit avatar Nov 28 '17 04:11 akraimit

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:

123survesh avatar Mar 14 '18 11:03 123survesh

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?

ece8264 avatar May 12 '19 18:05 ece8264

first, remove the .pyc file

steps

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

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

OO7kartik avatar Dec 11 '19 02:12 OO7kartik