Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nitinseven opened this issue Oct 27, 2017 · 5 comments
Open

Comments

@nitinseven
Copy link

nitinseven commented Oct 27, 2017

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 nitinseven changed the title Getting Errors Getting Errors with bad magic number in 'app.model': b'\x03\xf3\r\n' Oct 27, 2017
@vishalseshagiri
Copy link

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

@akraimit
Copy link

getting the same error. can anyone help it out?

@123survesh
Copy link

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 👍

@ece8264
Copy link

ece8264 commented May 12, 2019

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
Copy link

first, remove the .pyc file

steps

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

Miserlou/Zappa#854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants